[plt-scheme] memory leak (program attached)

From: Vladimir Konrad (vladimir at ok2home.net)
Date: Sat Nov 15 09:33:34 EST 2008

Hello,

I am trying to trace memory leak in program, which loads images and
samples the pixels (the file attached works but leaks memory).

I am not sure what I am doing wrong...

The "culprit" lines seem to be:

            (send bitmap-dc get-pixel x y colour)
            (list (send colour red) (send colour green) (send colour
            blue))

If I remove the do (x,y) loops from load-image, the program does not
leak the memory.

Is there a better way to do this?

Kind regards,

Vlad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: read-images.ss
Type: application/octet-stream
Size: 1819 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20081115/618687ec/attachment.obj>

Posted on the users mailing list.