Rules governing stack purging
ambassador at fourthworld.com
Mon Oct 30 17:43:28 EST 2006
Dave Cragg wrote:
> On 30 Oct 2006, at 20:23, Richard Gaskin wrote:
>> So while we have a workaround using this odd application of the
>> "delete stack" command which doesn't actually delete the stack but
>> merely purges it, I'm wondering if we should consider this behavior
>> a bug, as least as far as stack with their destroyStack set to true
>> are concerned?
> I think the current behavior can be seen as useful, although I agree
> it might seem odd in some ways.
> Say I want to do this:
> set the cProp of stack "C:/myStack.rev"
> save stack "C:/myStack.rev"
> If the stack is automatically purged after setting the prop, will the
> change be saved? By current logic, presumably not. And what will get
> saved in the second statement?
Consider your subsequent post:
> I just remembered something (third time this week, must be the
> new pills). Aren't "unused" stacks purged from memory by the engine
> when it needs to reclaim memory? I think I'm referring to stacks
> without the destryStack set, but which have been closed. I seem to
> recall reading this somewhere, either in the old Metacard docs, or
> the MC mailing list from long ago. If it's true, I wonder if it
> applies to "unopened" stacks in memory too.
This implies the engine introduces a "sometimes" rule ("sometime it does
one thing, sometimes something else"), which is generally bad news.
So to answer your question, I would suggest that saving might be limited
to stacks which have been opened with the "open" or "go" command,
provided the stack has its destroyStack set to true.
If a stack has its destroyStack set to false, the current behavior seems
somewhat acceptable (once the "sometimes" part is resolved).
>> Also, would it be worth pursuing a request for a "purge stack"
>> command so newcomers don't get the impression that "delete stack"
>> will actually delete their stack?
> You've only been asking for that for 8 years, Richard. Have patience!
> But yes, I think it would be good. However, I imagine it's not just a
> case of creating a synonym for "delete", as the behavior when applied
> to substacks would be different.
Actually, my original request was for a related change, depricating the
destroyStack property in favor of something less alarming:
This request is for a command, which I've just added to BZ:
Fourth World Media Corporation
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode