Code to check what is Not cleared out of memory
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code to check what is Not cleared out of memory
I culled the following from the website below as a result of Livecode quitting and locking me out of my mac for about the 5th time in two weeks. Having to restart from the boot-up disc each time because I can not shut down the mac. I had already set the preferences - memory in livecode to destroy stack on close, and had ticked the box where it asks you every time whether to destroy stack as an extra precaution. I also check the app/proj browser to make sure that it is empty. Nevertheless it has caught me out on a number of occasions and upon eventually re-starting from boot-up the recovered files are sometimes littered with png's, a few other known stacks, and even once two stacks that are not even in any of my folders - believe me I know what should be there - that was a surprise. So after searching I found this code. The trouble is I actually do not know how to use it. The site is obviously for the professional and assumes you know what to do - which I unfortunately don't. Thankyou gentlemen. As a side note there does seem to be consistency in livecode's unwelcome behaviour: I notice that this happens when I have been working on a single stack but have been constantly accessing other stacks to see their code, and shutting them down after just a few minutes, it seems to me that livecode resents me viewing multiple stacks over a period of hours.
http://revolution.screenstepslive.com/s ... -in-memory
function StacksInMemory
local theStack,theStacksInMemory,theSubstack
repeat for each line theStack in the mainstacks
put theStack & cr after theStacksInMemory
repeat for each line theSubstack in the substacks of stack theStack
put theSubstack & cr after theStacksInMemory
end repeat
end repeat
delete the last char of theStacksInMemory
return theStacksinMemory
end StacksInMemory
http://revolution.screenstepslive.com/s ... -in-memory
function StacksInMemory
local theStack,theStacksInMemory,theSubstack
repeat for each line theStack in the mainstacks
put theStack & cr after theStacksInMemory
repeat for each line theSubstack in the substacks of stack theStack
put theSubstack & cr after theStacksInMemory
end repeat
end repeat
delete the last char of theStacksInMemory
return theStacksinMemory
end StacksInMemory
Re: Code to check what is Not cleared out of memory
Hi Chris,
Maybe we can sort this out somehow.
Best
Klaus
please post your script(s) for this!but have been constantly accessing other stacks to see their code, and shutting them down after just a few minutes,
Maybe we can sort this out somehow.
Best
Klaus
Re: Code to check what is Not cleared out of memory
Hi Klaus, firstly that is impossible, it is not my scripts, since I hardly write that much. I mostly debug and watch what happens. Also, my scripts are so basic that it is embarrassing, No, it is the opening and closing of many stacks that causes the problems. I don't think sending you scripts will reveal anything.
Sorry Klaus.
Sorry Klaus.
Re: Code to check what is Not cleared out of memory
Klaus, this is another example where stacks that I have no knowledge about are being loaded into memory and Not Cleared Out upon Livecode quitting - This is the Major and Only source of the problem. This time luckily, I had re-started the mac, something I don't need to do or usually do except once a week. And here are the recovered files, this recovered folder is what the mac had to pull out of memory and ask whether or not you want it permanentlyy deleted. So as far as I can make out, either the snow leopard has a little issue with Livecode, or Livecode has an issue. I have to emphasize here that I did not import or load these stacks knowingly, but even so, it happens sometimes with stacks that I do have. Livecode is not removing some things from memory upon quitting despite those preferences being ticked. (not griping here ok, just explaining the facts - this is not a moan at livecode ok).
Kind regards
chris
Kind regards
chris
Re: Code to check what is Not cleared out of memory
Aha, OK.
Well, I never had these problems in the last 14 years with Livecode!?
Well, I never had these problems in the last 14 years with Livecode!?
Re: Code to check what is Not cleared out of memory
I've never seen the problem either, and I'm working on a project right now that opens and closes dozens of stacks. I don't recognize some of those Rev files, so presumably they are ones you downloaded to examine. I suspect one of those may be doing something that causes the problem. My main development machine is also running Snow Leopard, so I doubt the OS is at fault. If it happens again, try to notice if any particular stack has been opened during the session. I'm betting that's the problem.
I don't think you need the stacksInMemory handler, it just lists the stacks that are available. The Project Browser or Application Browser both do the same thing; you can look there and see all the stacks.
I don't think you need the stacksInMemory handler, it just lists the stacks that are available. The Project Browser or Application Browser both do the same thing; you can look there and see all the stacks.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Code to check what is Not cleared out of memory
Ok then, Thankyou Jacque.