-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disposable problems #433
Comments
Questions:
|
I don't understand why A couple of other things with Disposable:
|
I am really liking this cleanup. There were 37 usages of I believe I have done all items that @pixelzoom has mentioned, and I confirmed that there is no memory leak when creating 40 keyboard help dialogs in Ratio and Proportion (only 2MB increase) |
Changes look really great, thanks for doing this. I'm not entirely sure if // Marked true when this Disposable has had dispose() called on it (after disposeEmitter is fired)
private _isDisposed = false; ... so I guess leave it as is? Back to @zepumph in case there's anything else to be done. |
Great thought! After a discussion with @samreid a week ago or so, I feel like it makes sense that the flag is for "i have completely disposed" and not "I am currently disposing" which is much more challenging to calculate and to utilize effectively. We actually removing an exact assertion that you are mentioning, and instead reorganized the callback to guarantee that the view would only dispose once the model had already disposed fully. I'm going to close this. Thanks for the speedy review. |
From phetsims/scenery#1494 (comment) @pixelzoom said:
I agree! Let's clean up
disposer
and its usages, since we aren't going to use this among the above.The text was updated successfully, but these errors were encountered: