BookmarkSubscribe
Choose Language Hide Translation Bar
matteo_patelmo
Community Trekker

Deleting display boxes

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

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
matteo_patelmo
Community Trekker

Re: Deleting display boxes

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?

 

 

0 Kudos
3 REPLIES 3
txnelson
Super User

Re: Deleting display boxes

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
0 Kudos
matteo_patelmo
Community Trekker

Re: Deleting display boxes

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?

 

 

0 Kudos
txnelson
Super User

Re: Deleting display boxes

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

 

vlb<<delete;

Jim