Memory Leak on export png????
Mark Smith
mark at maseurope.net
Tue Mar 20 10:26:02 EDT 2007
on mouseUp
set the directory to "/Users/marksmith/Desktop/xpics/"
repeat with x = 1 to 1000
if the mouse is down then
exit to top
end if
put x & ".png" into tDest
set the backgroundColor of grp "counter" to any item of "red,blue"
set the backgroundColor of fld "counter" to any item of
"green,yellow"
put x into fld "counter" of grp "counter"
export snapshot from grp "counter" to file tDest as PNG
wait 1 millisec
end repeat
end mouseUp
Weird...I set this up earlier and was finding that it would stop with
an error, at various points, but usually at the 256th iteration, and
never later.
The error was something along the lines of 'could not write to file....'
However, if I changed <put x into fld "counter" of grp "counter"> to
<put "x=" & x into fld "counter" of grp "counter">, it completed
without problem every time.
Activity Monitor (I'm on a G4 mac laptop, Rev 2.8.0) reported only a
tiny increase in real and virtual memory use.
I had to go out, and quit Revolution. Now I've come back, the same
stack works correctly whatever I put in the <put x into...> line.
Best,
Mark
More information about the use-livecode
mailing list