18 May 2012 2:09 AM #1
- Join Date
- Jul 2007
- Enschede, The Netherlands
- Vote Rating
Destroy a store
I'm writing a custom component that creates a private store for itself (I don't want a global store initiated from the application). On destroying the custom component, I thought I should destroy the store too.
But there's no documented 'destroy' method in the docs, and calling the store.destroy method sends a 'delete' request for all the records in the store, which is (obviously) not what I want.
Browsing through the source, I found a 'destroyStore' method that seems to do the job right.
But isn't there a 'destroy' method on every component that does nothing else than to remove all references and data, and prepares the object for garbage collection? Is the store an exception here?
Shouldn't the 'destroy' method do what the 'destroyStore' method does?
RonaldRonald van Raaphorst aka Ronaldo
I'm a freelance software developer in Java, PHP, and ExtJs.
22 May 2012 7:31 AM #2
I am not sure why it was renamed from the normal convention. In looking at the code, destroyStore() is the same as store.destroy() in 3.4