Hi,
Here is the original script:
on doExport
local tNum
local twID
local tFol
local tDest
local myImageData
put text of fld "number" into tNum
put the windowID of this stack into twID
put text of fld "export folder" into tFol
if there is not a folder tFol then
answer "Export folder not found!"
exit to top
end if
set the defaultfolder to tFol
repeat with x = 1 to (0 + tNum)
put "F-" & x & ".png" into tDest
put x into field "FieldCounter" of group "GroupCounter"
set the alwaysBuffer of the templateImage to false
--export snapshot from group "GroupCounter" to file tDest as PNG
export snapshot from group "GroupCounter" to myImageData as PNG
end repeat
answer "Done!"
end doExport
I still get the error at file 289, is this what you thought would
happen?
Thanks a lot for this
All the Best
Dave
On 23 Mar 2007, at 15:38, J. Landman Gay wrote:
Dave wrote:
Took me 10 minutes to build the test for the export snapshot
command and 2 minutes to run it.
And, as it turns out, we were all wrong. There is a leak, and they
will fix it, but the reason there is a leak makes perfect sense.
The bug I posted about this problem only a day or two ago has
already been verified and answered. This is a *strong*
recommendation that those of you who don't want to submit reports
should change your mind. Since I was the submitter, the respone
came directly to my inbox. If Dave had submitted, he'd have
received the response instead.
It's not that I don't want to, it's that I can't log on from here and
when I get home at the weekends I am so tired and busy catching up
with "home" stuff that it's hard to find the time.
Here is what they said, and now that I think of it, I'm almost
embarrassed that I didn't think of the reason myself:
The memory leak that has been observed here occurs for all forms
of 'export
snapshot' and any image format - however, it *only* occurs if the
alwaysBuffer
of the templateImage is set to true.
To eliminate the leak:
set the alwaysBuffer of the templateImage to false
Before using the export command.
The setting of this property is set differently in the Revolution
and MC IDE's
and in standalones (and on Mac OS X and Windows) - explaining the
difficulty in
reproducing it for some people.
While I admit the leak needs to be fixed, the reason for it become
obvious; alwaysbuffer reserves memory space for the image in an
offscreen buffer. The bug does not show up on some platforms, and
the alwaysbuffer setting varies from one IDE to another. It would
be difficult to stress-test this bug; it only seems to occur in one
very specific circumstance, in only one IDE, and only on one OS.
Dave, your original script should work just fine if you change the
alwaysbuffer of the templateimage to false.
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution