File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @thatopen/components" ,
33 "description" : " Collection of core functionalities to author BIM apps." ,
4- "version" : " 2.1.21 " ,
4+ "version" : " 2.1.22 " ,
55 "author" : " That Open Company" ,
66 "contributors" : [
77 " Antonio Gonzalez Viegas (https://github.com/agviegas)" ,
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export class Components implements Disposable {
1414 /**
1515 * The version of the @thatopen/components library.
1616 */
17- static readonly release = "2.1.21 " ;
17+ static readonly release = "2.1.22 " ;
1818
1919 /** {@link Disposable.onDisposed } */
2020 readonly onDisposed = new Event < void > ( ) ;
Original file line number Diff line number Diff line change @@ -298,7 +298,11 @@ export class IfcGeometryTiler extends Component implements Disposable {
298298 }
299299
300300 private cleanUp ( ) {
301- this . webIfc . Dispose ( ) ;
301+ try {
302+ this . webIfc . Dispose ( ) ;
303+ } catch ( e ) {
304+ // Problem disposing memory (maybe already disposed?)
305+ }
302306 ( this . webIfc as any ) = null ;
303307 this . webIfc = new WEBIFC . IfcAPI ( ) ;
304308 this . _visitedGeometries . clear ( ) ;
Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ export class IfcLoader extends Component implements Disposable {
7171
7272 /** {@link Disposable.dispose } */
7373 dispose ( ) {
74+ try {
75+ this . webIfc . Dispose ( ) ;
76+ } catch ( e ) {
77+ // web-ifc couldn't be disposed
78+ }
7479 ( this . webIfc as any ) = null ;
7580 this . onDisposed . trigger ( IfcLoader . uuid ) ;
7681 this . onDisposed . reset ( ) ;
@@ -198,7 +203,11 @@ export class IfcLoader extends Component implements Disposable {
198203 * ```
199204 */
200205 cleanUp ( ) {
201- this . webIfc . Dispose ( ) ;
206+ try {
207+ this . webIfc . Dispose ( ) ;
208+ } catch ( e ) {
209+ // web-ifc couldn't be disposed
210+ }
202211 ( this . webIfc as any ) = null ; // Clear the reference to the Web-IFC library
203212 this . webIfc = new WEBIFC . IfcAPI ( ) ; // Create a new instance of the Web-IFC library
204213 this . _visitedFragments . clear ( ) ; // Clear the map of visited fragments
You can’t perform that action at this time.
0 commit comments