Results 1 to 5 of 5

Thread: 6.5.0, 6.5.1 Grid store in Window does not get destroyed when the window is destroyed

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium User
    Join Date
    Jan 2017
    Posts
    22
    Vote Rating
    1
      0  

    Default 6.5.0, 6.5.1 Grid store in Window does not get destroyed when the window is destroyed

    I have a store which is passed into a window and the window creates a ChainedStore from it and uses it in the grid. The ChainedStore has a filter function on it. When the Window is destroyed the grid's store (ChainedStore) is not being destroyed as well. This is at best a memory leak but in my case it causes exceptions because of the code in the filter. If the main store has data changed it causes the filter to fire in the chained store even after the window has been closed and destroyed. Here is a fiddle that shows the problem.

    https://fiddle.sencha.com/#view/editor&fiddle/26jd

    A workaround is in the fiddle as well to manually destroy the grid store when the window is destroyed. This needs to be fixed in the framework though.

  2. #2
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,319
    Vote Rating
    589
      0  

    Default

    Would it help if you added "autoDestroy: true," on the chainedStore?

  3. #3
    Sencha Premium User
    Join Date
    Jan 2017
    Posts
    22
    Vote Rating
    1
      0  

    Default

    autoDestroy does work. Is that the expected behavior? It just seems weird. I don't think we have ever used it before with hundreds of stores so it concerns me a little bit. It also makes me wonder if we need to look at this scenario across our entire system.

  4. #4
    Sencha Premium User
    Join Date
    Nov 2010
    Location
    Chicago
    Posts
    2,319
    Vote Rating
    589
      0  

    Default

    Quote Originally Posted by SteveOverton View Post
    autoDestroy does work. Is that the expected behavior? It just seems weird. I don't think we have ever used it before with hundreds of stores so it concerns me a little bit. It also makes me wonder if we need to look at this scenario across our entire system.
    The same store could be used on multiple components. This is way the store is not destroyed by default.

    There are some exceptions. A tree store can be used only on a single tree, so there's one to one mapping. Also, I believe a buffered store can be used on a single grid. The same virtual store (which is used in place of the buffered store) can be used on multiple modern grids.

  5. #5
    Sencha Premium User
    Join Date
    Jan 2017
    Posts
    22
    Vote Rating
    1
      0  

    Default

    Thanks for the info. Much appreciated.

Similar Threads

  1. Window isn't really destroyed... ?
    By n00b in forum Ext: Q&A
    Replies: 3
    Last Post: 6 Jun 2014, 4:35 AM
  2. Replies: 2
    Last Post: 9 Apr 2014, 6:21 AM
  3. Replies: 2
    Last Post: 7 Dec 2010, 1:29 AM
  4. Replies: 1
    Last Post: 7 Dec 2010, 12:02 AM
  5. What gets destroyed when a window closes ?
    By keckeroo in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 9 Oct 2009, 8:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •