PDA

View Full Version : how to complete destroy store (extjs 4.1)



maneljn
14 Jun 2012, 9:36 AM
how can i complete destroy an Store instance ?
i mean, destroy the object, unregister from storemanager, destroy all nested proxy, data loaded, etc...

Thanks

sword-it
14 Jun 2012, 11:23 PM
Hi maneljn,

you can use destroyStore() method, however it is private method and does not show in docs. But it looks like destroy() method in extjs3.4


yourStore.destroyStore();

for more help see - http://stackoverflow.com/questions/10525486/how-to-destroy-stores-in-extjs-4-1

maneljn
15 Jun 2012, 12:24 AM
I tried mystore.destroyStore() and after if i put console.log(mystore) , it's still there.

Manel

scottmartin
15 Jun 2012, 8:58 AM
Have a look at:
http://www.sencha.com/forum/showthread.php?212134

Regards,
Scott.

maneljn
17 Jun 2012, 11:03 PM
thanks Scott, but how can i know what are all references to the store , for delete it, to make store eligible for garbage collection ??

rgralhoz
8 Oct 2013, 11:47 AM
Hi, could Sencha provide a public API to destroy a store and it's cached data?