You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing phetsims/scenery-phet#769, @zepumph and I discovered a relatively serious memory leak in Disposable, which is the base class for (among other things) PhetioObject.
public dispose(): void {
assert && assert( !this.isDisposed, 'Disposable can only be disposed once' );
this._disposeEmitter.emit();
+ this._disposeEmitter.dispose();
this.isDisposed = true;
}
In calculus-grapher, we use disposeEmitter througout GraphTypeLabelNode, which appears as labels for the Notation radio buttons appears in the Preferences dialog: f'(x), f'(t), df/dx, df/dt. An example from GraphTypeLabelNode is:
In Slack#DM, I asked @zepumph about the above example:
There’s no handle to the listener function, but labelStringProperty is included by closure. Is this going to be a leak? Should we patch in calculus-grapher 1.0 ?
... and he replied:
Patching the Branch seems prudent.
So I'm going to proceed with patching calculus-grapher 1.0, to be tested in the next RC.
For phetsims/qa#924
While reviewing phetsims/scenery-phet#769, @zepumph and I discovered a relatively serious memory leak in Disposable, which is the base class for (among other things) PhetioObject.
From phetsims/scenery-phet#769 (comment), the line added in this diff is missing, so
disposeEmitter
listeners are not freed.public dispose(): void { assert && assert( !this.isDisposed, 'Disposable can only be disposed once' ); this._disposeEmitter.emit(); + this._disposeEmitter.dispose(); this.isDisposed = true; }
In calculus-grapher, we use
disposeEmitter
througout GraphTypeLabelNode, which appears as labels for the Notation radio buttons appears in the Preferences dialog: f'(x), f'(t), df/dx, df/dt. An example from GraphTypeLabelNode is:In Slack#DM, I asked @zepumph about the above example:
... and he replied:
So I'm going to proceed with patching calculus-grapher 1.0, to be tested in the next RC.
@veillette @amanda-phet FYI.
The text was updated successfully, but these errors were encountered: