Go Back   SmartClient Forums > Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 2nd Sep 2011, 01:16
martintaal martintaal is offline
Registered Developer
 
Join Date: Oct 2010
Posts: 333
Default Are recordcomponents in the pool destroyed? (when the grid is destroyed)

Hi,
I seem to notice that when I close a tab with a grid (with record components) that the record components are not all destroyed. Is this a correct observation?

Adding the code below to my custom grid class, solved it for me:

Code:
 
  destroy: function() {
    var i, components;
    this.Super('destroy', arguments);
    
    components = this.getRecordComponentPool();
    if (components) {
      for (i = 0; i < components.length; i++) {
        components[i].destroy();
      }
    }
  },
Reply With Quote
  #2  
Old 5th Sep 2011, 00:07
martintaal martintaal is offline
Registered Developer
 
Join Date: Oct 2010
Posts: 333
Default

Bump.......
Reply With Quote
  #3  
Old 5th Sep 2011, 10:56
Isomorphic Isomorphic is online now
Administrator
 
Join Date: May 2006
Posts: 30,612
Default

Sorry for the delay - they were not automatically destroyed, but we decided this was an oversight and that they should be destroyed automatically by default. New builds will now automatically destroy recordComponents and there is a method you can call to prevent this for any individual recordComponent.

Your code will basically safely no-op if you leave it in.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grid with nested grid and different grid columns in each row Jarid Smart GWT Technical Q&A 0 8th Mar 2011 08:06
Nested grid in nested grid?! MPoppe Smart GWT Technical Q&A 1 2nd Dec 2010 11:33
Forcing datasource to refresh grid row. mnenchev Smart GWT Technical Q&A 1 19th Feb 2010 11:39
Selective Refresh of columns on list grid ypoovil Technical Q&A 1 23rd Dec 2009 13:52
Grid in a grid bolid Technical Q&A 3 13th Aug 2008 09:22

© 2010,2011 Isomorphic Software. All Rights Reserved