On Fri, 25 Aug 2000, Marc Lehmann wrote:

> > More generally is it possible for script-fu scripts to introduce memory 
> > leaks even tough scheme in itself is a garbage collected language?
> 
I think that if a script terminates unexpectedly it leaks all GIMP
resources that it created.  If the resource, such as a image, has been
displayed then the user can manually clean these up, but for invisible
resources (which include all images if you're using net-fu) are leaked.

> it should be "solved" for all cases (I can think of a lot of cases where
> holding images inside the gimp for cahcing reasions makes a lot of sense,
> without them being actively referenced).
> 
Sure, but it isn't unreasonable to expect script writers to call a
function to tell GIMP that this object (image) should be preserved after
teh script terminates.  That way, anything which hasn't been explicitely
flagged in this manner could be garbage collected after the script
terminates.

While it may not be possible/feasible/worthwhile having GIMP "garbage
collect" every possible resource after a script terminates, it should be
fairly easy to reap the worst offenders (images?).


-Dave

http://www.flamingtext.com/

Reply via email to