having to help Rev (was: Re: Memory Leak on export png????)
J. Landman Gay
jacque at hyperactivesw.com
Fri Mar 23 10:38:53 CDT 2007
> 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.
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.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode