Question re destroyStack

William Prothero prothero at earthednet.org
Wed Feb 18 14:40:08 EST 2015


Folks:
I’m setting up my app. It consists of various stacks and their library stacks. When each sub-section of the app gets called from the main index stack, the destination main stack is loaded, and this then loads a library stack and its substacks that hold the library code. The library substacks have been put into the message path with the “start using ….” command. When the sub-section app quits, I want it and its “used” library stacks to be  removed from memory. 

The structure is this:

Main splash stack
Main index and navigation stack  —user selects a subApp stack to go to
Main subApp1 stack 
Main subApp1-Lib stack —stack with substacks that contain code needed by subApp1
     substacks of subApp1-Lib which contain code only in the stack script
Main subApp2 stack
     substacks of subApp2-Lib which contain code only in the stack script
etc

Note: I could have had all of the lib stacks as substacks in my Main subApp stack.
When the subApp1 stack is open, all of the subApp1-Lib substacks are “in use” with the “start using” command.

My question is: If I do:
set the destroystack of stack “subApp1-Lib ” to TRUE
close stack “subApp1-Lib “

Will all of the substacks in the subApp1-Lib stack also be removed from memory?

I think a possibly easier approach would have been to have the subApp as a main stack and all of its library stacks as substacks of it. But my question still stands re whether substacks are removed from memory when the main stack is destroyed.

Thanks,
Bill

William A. Prothero
http://es.earthednet.org/




More information about the use-livecode mailing list