memory leak

"Walter C. Pelissero" <[email protected]> Tue, 17 Jul 2007 11:06:45 +0200
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
Walter C. Pelissero writes:
 > I've got a program that is using an icon-view.  After showing
 > substantial amount of icons (not at the same time) it dies of memory
 > exhaustion (within GTK control).  Beside the fact this happens when
 > the lisp process has reached a mere 200MB, I don't understand why it
 > should be growing that big.
 > 
 > Of course this is just a guess, but considering what else the program
 > is doing (not much), I believe the leak must be in the icon-view,
 > possibly due to the way I'm I'm using it.

After a little poking around I came to the conclusion that it has
something to do with contained objects.

This function runs out of memory in few seconds:

(defun leak ()
  (let ((store (make-instance 'gtk:list-store :column-types '(gdk:pixbuf) :column-names '(:thumbnail))))
    (dotimes (x 10000)
      (gtk:list-store-clear store)
      (gc :full t)
      (dotimes (x 100)
	(gtk:list-store-append store (vector (gdk:pixbuf-load #P"/path/to/a/small/file.png")))))))

-- 
walter pelissero
http://www.pelissero.de

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/