Subscribe Bookmark RSS Feed

Deleting display boxes

matteo_patelmo

Community Trekker

Joined:

Dec 23, 2015

Hello,

 

following suggestions from txnelson from a previous post, I'm creating a few display boxes without showing them in a window, in order to extract the informations I need with not visualizations for the user.  I am not sure, though, if I need to delete these display boxes explicitly or if some garbage collection is active to delete them at some time. 

 

If I do need to delete them, is boxName<<delete box  the correct way? 

 

thanks

Matteo

1 ACCEPTED SOLUTION

Accepted Solutions
matteo_patelmo

Community Trekker

Joined:

Dec 23, 2015

Solution

Thanks. Could you please explain what to do with vlb in your example? is this display box taking up memory as well? I suppose it gets closed automatically with the << close window message, but it's not very clear how this happens.

 

What about an empty V List Box created but not shown in any window, like:

 

vlb=V List Box();

 

?

 

Should it be deleted? how?

 

 

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Any object created takes up memory, if it is visible or not.  So it is wise to clean up any created objects.  Here is what I do for both visible and invisible platforms.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" ,private);
vlb = V List Box( biv = dt << bivariate( x( :height ), y( :weight ) ) );

biv << close window;
Jim
matteo_patelmo

Community Trekker

Joined:

Dec 23, 2015

Solution

Thanks. Could you please explain what to do with vlb in your example? is this display box taking up memory as well? I suppose it gets closed automatically with the << close window message, but it's not very clear how this happens.

 

What about an empty V List Box created but not shown in any window, like:

 

vlb=V List Box();

 

?

 

Should it be deleted? how?

 

 

txnelson

Super User

Joined:

Jun 22, 2012

vlb can be deleted, but it is a very small object by its self.

 

vlb<<delete;

Jim