Removing a stack from memory...

AndyP smudge.andy at googlemail.com
Tue May 15 03:28:00 EDT 2018


This is my go-to routine for quitting applications which seems always to get
the job done.

//General quit routine

on quitMyProject
   lock messages
   -- stop using stacks
   put the stacksInUse into myStacks
   repeat for each line myStack in myStacks
      stop using stack myStack
   end repeat
   -- stacks
   put the openStacks into myStacks
   put "message box,home,tool,Message Box,revTools,revMenubar" & comma & the
short name of me into myDontClose
   repeat for each line myStack in myStacks
      if myStack is not among the items of myDontClose then close stack
myStack
   end repeat
   -- messages
   put the pendingmessages into myMsgs
   repeat for each line myMsg in myMsgs
      cancel item 1 of myMsg
   end repeat
   set the backdrop to none
   close me
   if the environment is not "development" then
      quit
   end if
end quitMyProject



-----
Andy Piddock 


My software never has bugs. It just develops random features. 

TinyIDE  a Free alternative minimalist IDE Plugin for LiveCode 


Script editor Themer for LC http://2108.co.uk  

PointandSee is a FREE simple but full featured under cursor colour picker / finder.
http://www.pointandsee.co.uk  - made with LiveCode
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html




More information about the Use-livecode mailing list