-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
API to properly dispose objects #545
Comments
Just there be a TS interface that is like C#'s IDisposable? |
Seems good, both ember-lifeline and ember-concurrency could use (and want) this functionality. |
@NullVoxPopuli the point here (if I'm reading @chancancode's suggestion correctly) is that you don't have to require the object itself to implement all of that interface. That keeps the API surface of the various classes smaller. |
Right, or rather, we would provided functions that could be used on any objects, rather than making the objects implement anything. Think Ember.get() vs EmberObject.prototype.get(). |
Ya, exactly. This is roughly akin to the registerDisposable in ember-lifeline (and Ember would implement the |
See an earlier proposal of this here emberjs/ember.js#14602. |
Can we close this? |
@locks, I think we can close this issue, because |
@ember/object
should provide the following APIs:This is required for objects that doesn't inherit from Ember.Object (e.g. Glimmer Components, other native classes) to participate in the destruction protocol (dispose of the "meta", etc).
The text was updated successfully, but these errors were encountered: