Hybrid View
-
6 Dec 2012 8:21 AM #1
DataView doesn't destroy store, created by default
DataView doesn't destroy store, created by default
REQUIRED INFORMATION
Ext version tested:- Sencha Touch 2.1
- Chrome 23(Windows)
- By default Ext.data.Store is created with autoDestroy set to false.
- When DataView is created with config, which contains only data option, then DataView will create Store for this data.
- When DataView is destroyed, this Store will be never destroyed, because its autoDestroy option is set to false.
- Create DataView with specified data in the config
- Call DataView.destroy()-> DataView is destroyed, but store is cached in Ext.StoreManager
- Store created by DataView should be destroyed
- Store created by DataView is not destroyed
Code:var data = [ {firstName: 'Ed', lastName: 'Spencer'}, {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Aaron', lastName: 'Conran'}, {firstName: 'Jamie', lastName: 'Avins'} ]; var view = Ext.create('Ext.DataView', { fullscreen: true, data:data, itemTpl: '{firstName} {lastName}' }); view.destroy(); Ext.ComponentManager.map // no reference to dataview Ext.StoreManager.map // contains ext-data-store-1 created by view
-
6 Dec 2012 8:37 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,710
- Vote Rating
- 436
Thanks for the report! I have opened a bug in our bug tracker.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3802
in
Sprint 28.


Reply With Quote