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
This is generally not an issue for most users, as they are not commonly doing their own async from within the adapter instances. However, as soon as you attempt to do things like tracking response info (by queueing and firing a request) or doing exponential backoff you might find yourself in a situation where you need to clean up a timer (clearTimeout, runDestroyables, etc). Since we never run adapterInstance.destroy(), the user can't implement willDestroy and have that cleanup code be ran (ember-concurrency and ember-lifeline both leverage .destroy() being called in order to properly cleanup).
The text was updated successfully, but these errors were encountered:
It appears that
adapter
instances are never being destroyed.Related codepaths:
We configure the
adapter
type to be non-singleton here:data/packages/-ember-data/addon/setup-container.js
Line 37 in 005ff4d
And then we instantiate the
adapter
instances withowner.lookup
here:data/packages/store/addon/-private/system/core-store.ts
Line 3254 in 005ff4d
But in the store's
willDestroy
we do nothing with this._adapterCache (we should loop over them and be calling.destroy()
)data/packages/store/addon/-private/system/core-store.ts
Line 3490 in 005ff4d
This is generally not an issue for most users, as they are not commonly doing their own async from within the
adapter
instances. However, as soon as you attempt to do things like tracking response info (by queueing and firing a request) or doing exponential backoff you might find yourself in a situation where you need to clean up a timer (clearTimeout
,runDestroyables
, etc). Since we never runadapterInstance.destroy()
, the user can't implementwillDestroy
and have that cleanup code be ran (ember-concurrency and ember-lifeline both leverage.destroy()
being called in order to properly cleanup).The text was updated successfully, but these errors were encountered: