1. #1
    Sencha Premium Member Ronaldo's Avatar
    Join Date
    Jul 2007
    Location
    Enschede, The Netherlands
    Posts
    291
    Vote Rating
    1
    Ronaldo is on a distinguished road

      0  

    Default Destroy a store

    Destroy a store


    Hi all,

    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?

    Best regards,
    Ronald
    Ronald van Raaphorst aka Ronaldo
    I'm a freelance software developer in Java, PHP, and ExtJs.


    Skyperonald_twensoc
    Mailinfo@twensoc.nl

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    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

    Regards,
    Scott.

Thread Participants: 1