Memory Problems

Pierre Sahores psahores at easynet.fr
Fri Feb 21 04:22:01 EST 2003


Dave Cragg wrote:
> 
> At 12:14 pm -0800 20/2/03, Ray Horsley wrote:
> >Thank you xbury and Pierre,
> >
> >I appreciate the suggestions, however, I've opened all 36 stacks I'm using
> >for testing, set the Destroy Stack on Close and the Destroy Window on Close
> >to true, and I also set the Always Buffer to false for all of them.  Sorry,
> >no change.  I still find Metacard increasing in memory from about 17 megs to
> >a little over 30 if I go to or refer to each of them.  Any other ideas?
> >
> >Thanks,
> >
> 
> I  remember having a similar problem a few versions ago. I found that
> the stacks weren't cleared from memory until the current handler
> stopped running. So in a repeat loop like yours, memory won't get
> cleared until after the loop finishes.
> 
> Things to try:
> 
> Add a wait after you have handled a certain number of stacks. For
> example, you could try adding the following line at the end of your
> repeat loop to wait after every 5th stack:
> 
> repeat with L=1 to number of lines of allStacks  -- list of 30 stack paths
>    ##other stuff here
>    delete stack stackPath
>    if L mod 5 = 0 then wait 100 milliseconds  ##add this
> end repeat
> 
> If that doesn't work, try using "send ... in <time>". Something like:
> 
> repeat with L=1 to number of lines of allStacks  -- list of 30 stack paths
>    put line L of allStacks into stackPath
>    send "doStuff stackpath" to me in 20 milliseconds
> end repeat
> 
> on doStuff stackpath
>    set the defaultStack to stackPath     -- or go stack stack path
>    -- do some stuff like set scripts and save the stack
>    delete stack stackPath
> end doStuff
> 
> Cheers
> Dave
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard

In the same way described by Dave, tou could, perhaps, get good results
in using a recursive command included in an "on idle" handler instead of
using your statements inside a repeat loop and in storing allstacks an
the lines to parse in allstacks in two global vars.

-- 
Cordialement, Pierre Sahores

Inspection académique de Seine-Saint-Denis.
Applications et bases de données WEB et VPN
Qualifier et produire l'avantage compétitif



More information about the metacard mailing list