Removing objects from the window

Posted by Darren Parr on 09-Oct-2012 08:51

Hi

Just playing with removing a tree and spliitter from a window and so far the delete object statements do nothing. I have a good reason for doing this.Ive got a tree and ultragrid seperated by a splitter. In some situations the tree won't be shown and hence I want to remove it after initializecomponent. Any ideas? I though a few well chosen delete opbject statements would do it for me and then a statement to specify that the ultragrid should fill the window.

Any help is appreciated.

Ta

Darren

All Replies

Posted by Peter Judge on 09-Oct-2012 09:18

darrenp wrote:

Hi

Just playing with removing a tree and spliitter from a window and so far the delete object statements do nothing. I have a good reason for doing this.Ive got a tree and ultragrid seperated by a splitter. In some situations the tree won't be shown and hence I want to remove it after initializecomponent. Any ideas? I though a few well chosen delete opbject statements would do it for me and then a statement to specify that the ultragrid should fill the window.

Any help is appreciated.

One thing to remember is that there are 2 garbage collectors in play : the ABL one and the .NET one. Depending on what you delete, you may just be deleting the ABL side and the .NET side would be still alive. Laura Stern and I did a talk at the US PUG Challenge earlier this year, where she talked about what happens with the GC for hybrid objects. The slides are at http://pugchallenge.org/2012PPT/What_is_my_object_doing,_anyway_(with_notes).pdf , starting at around page 43 (page 44's example may be what you're seeing).

-- peter

Posted by Darren Parr on 11-Oct-2012 11:36

Hi

I found it worked best if I made this invisible. The whole ting behaved itself in that situation.

Thanks

Darren

This thread is closed