Rules governing stack purging

Chipp Walters chipp at
Wed Nov 1 02:18:28 EST 2006

I'm going to have to agree with Dave and Trevor. I've always thought
destroyStack comes into play only when closing stacks. If set to true, the
stack is purged from memory (usually). I pretty much always use an explicit
'delete stack "xyz"' when I want to make sure a mainstack is closed.

And like Dave, I, too, use stacks as repositories for data. Richard, I'm not
sure I understand your comment about parsing the stack file format. I'm
pretty sure Dave is just talking about using stacks to store data in--
separate from the business logic of the application. I typically use:

go inv stack "xyz" when I want to access data from a stack. Though I also
frequently check a custom prop for versioning, too. In both cases, I'm
careful to 'delete' the stack when done.

I think Dave's point regarding reading customProps from a stack, doing
something with them, then saving them to the stack and finally closing it,
is common among many of us who use customProps to hold data. Finally,
Richard, I know you use the fine MC IDE and have a whole sweet(sp) of tools
you use. But, in the Rev IDE, I'm with Jacque and one of the first things I
do is set the default pref for destroyStack to true. It just works better. I
think it should be the default.

I guess it's one of choice. Mine is to leave it like it is, but I do agree
some naming nomenclature may be necessary. I particularly like the notion of
a 'purge stack' command.


More information about the Use-livecode mailing list