-
3 Apr 2012 12:30 AM #1
Garbage collection of Models (ST2)
Garbage collection of Models (ST2)
Our application is running day and night data is going in and out of application. Models are created based on data from the server and old models are updated or removed from stores.
We would expect that at some point the browser destroys the old models because no-one is referencing them. However we've noticed that when you create a model, a reference to it is automatically stored in the Ext.Model.cache. These objects will never be available for garabage collection and memory usage will continue to grow.
For now we have a small workaround, we remove the model from cache when stores are no longer using it:
Code:unjoin: function () { this.callParent(arguments); if (!this.stores.length) this.destroy(); }
-
3 Apr 2012 2:27 AM #2
Garbage collection is a known problem:
http://www.sencha.com/forum/showthread.php?191718-store-garbage-collection
-
9 Apr 2012 7:48 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,652
- Vote Rating
- 14
Thank you for the report and suggestion.
-
9 Apr 2012 1:19 PM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
Hi,
Thanks for the report! I have posted temporary overrides that you can use to resolve this issue til the 2.0.1 patch in the other thread: http://www.sencha.com/forum/showthre...age-collection
Best,
Tommy
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2689
in
Sprint 21 (2.0.1).


Reply With Quote
