Search code examples
extjs4storedestroy

ExtJS4 autoDestroy for stores?


in ExtJS3 i was using the "autoDestroy" config of Ext.data.Store to automatically destroy the store as soon as the grid was destroyed that it belongs to. In ExtJS4 this config seems to be gone.

How am i supposed to this in ExtJS4? Do i have to destroy the store by myself?

Thanks for your help!


Solution

  • You are right, the autoDestroy config is gone. You have to destroy the store by yourself.

    Usually this will be done by the GarbageCollector, when all references to your store are gone. If your store has an ID you also have to remove him from the Ext.data.StoreManager after the grid was destroyed.