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
During the meeting on Dec 29, we discussed an API that automatically pairs link/unlink and addListener/removeListener, etc. This is not exclusive to axon, but would also appear in scenery, etc.
Most Scenery objects are reused, so they have initialize() and dispose(). Thus dispose would be called multiple times.
So if Scenery internal code were to use this:
dispose() would need to be callable multiple times (actually clear the array)
autolink shouldn't create a new function closure every time it's called (avoiding creation of objects, particularly when our disposable thing is pulled out of a pool).
During the meeting on Dec 29, we discussed an API that automatically pairs link/unlink and addListener/removeListener, etc. This is not exclusive to axon, but would also appear in scenery, etc.
We discussed an API like this:
Discussed in the context of phetsims/chipper#418
The text was updated successfully, but these errors were encountered: