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