@@ -276,7 +276,9 @@ export abstract class LabWidgetManager extends ManagerBase<Widget>
276
276
* #### Notes
277
277
* This is a read-only property.
278
278
*/
279
- abstract get isDisposed ( ) : boolean ;
279
+ get isDisposed ( ) : boolean {
280
+ return this . _isDisposed ;
281
+ }
280
282
281
283
/**
282
284
* Dispose the resources held by the manager.
@@ -285,6 +287,7 @@ export abstract class LabWidgetManager extends ManagerBase<Widget>
285
287
if ( this . isDisposed ) {
286
288
return ;
287
289
}
290
+ this . _isDisposed = true ;
288
291
289
292
if ( this . _commRegistration ) {
290
293
this . _commRegistration . dispose ( ) ;
@@ -442,6 +445,7 @@ export abstract class LabWidgetManager extends ManagerBase<Widget>
442
445
protected _restoredStatus = false ;
443
446
protected _initialRestoredStatus = false ;
444
447
448
+ private _isDisposed = false ;
445
449
private _registry : SemVerCache < ExportData > = new SemVerCache < ExportData > ( ) ;
446
450
private _rendermime : IRenderMimeRegistry ;
447
451
@@ -506,16 +510,6 @@ export class KernelWidgetManager extends LabWidgetManager {
506
510
this . _restored . emit ( ) ;
507
511
}
508
512
509
- /**
510
- * Get whether the manager is disposed.
511
- *
512
- * #### Notes
513
- * This is a read-only property.
514
- */
515
- get isDisposed ( ) : boolean {
516
- return this . _kernel === null ;
517
- }
518
-
519
513
/**
520
514
* Dispose the resources held by the manager.
521
515
*/
@@ -524,9 +518,8 @@ export class KernelWidgetManager extends LabWidgetManager {
524
518
return ;
525
519
}
526
520
527
- super . dispose ( ) ;
528
-
529
521
this . _kernel = null ! ;
522
+ super . dispose ( ) ;
530
523
}
531
524
532
525
get kernel ( ) : Kernel . IKernelConnection {
@@ -628,16 +621,6 @@ export class WidgetManager extends LabWidgetManager {
628
621
}
629
622
}
630
623
631
- /**
632
- * Get whether the manager is disposed.
633
- *
634
- * #### Notes
635
- * This is a read-only property.
636
- */
637
- get isDisposed ( ) : boolean {
638
- return this . _context === null ;
639
- }
640
-
641
624
/**
642
625
* Dispose the resources held by the manager.
643
626
*/
@@ -646,8 +629,8 @@ export class WidgetManager extends LabWidgetManager {
646
629
return ;
647
630
}
648
631
649
- super . dispose ( ) ;
650
632
this . _context = null ! ;
633
+ super . dispose ( ) ;
651
634
}
652
635
653
636
/**
0 commit comments