In sqWin32Window.c, function clipboardWriteFromAt
The line
/* allocate temporary storage and copy string (inserting Lfs) */ cvt = tmp = malloc(utf8Count+1);
cvt is not released before function returns.
Should be safe to do so after its use in
/* Convert data to Unicode UTF16. */ MultiByteToWideChar( CP_UTF8, 0, cvt, -1, out, wcharsNeeded );
To reproduce: Write a large string in a workspace (say, 1MB of ascii chars), then repeatedly copy it. Squeak.exe's memory usage will grow, not released when doing garbage collection.
Cheers, Henry
Henrik,
great catch! How did you find it??
On Fri, Nov 19, 2010 at 2:08 AM, Henrik Johansen < henrik.s.johansen@veloxit.no> wrote:
In sqWin32Window.c, function clipboardWriteFromAt
The line
/* allocate temporary storage and copy string (inserting Lfs) */ cvt = tmp = malloc(utf8Count+1);
cvt is not released before function returns.
Should be safe to do so after its use in
/* Convert data to Unicode UTF16. */ MultiByteToWideChar( CP_UTF8, 0, cvt, -1, out, wcharsNeeded );
To reproduce: Write a large string in a workspace (say, 1MB of ascii chars), then repeatedly copy it. Squeak.exe's memory usage will grow, not released when doing garbage collection.
Cheers, Henry
On Fri, Nov 19, 2010 at 3:23 PM, Henrik Sperre Johansen < henrik.s.johansen@veloxit.no> wrote:
On 19.11.2010 20:53, Eliot Miranda wrote:
Henrik,
great catch! How did you find it??
By chance. Was trying to better understand the keyboard event creation code, scrolled too far, and kept on reading :)
that's great. You don't skim as you read but instead understand deeply. Most impressive.
best Eliot
Cheers, Henry
vm-dev@lists.squeakfoundation.org