[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Garbage collector issues
- From: "Stefano Lanzavecchia" <stf@...>
- Date: Wed, 20 Dec 2000 13:01:49 +0100
> I have a defined a userdata type (an image) that holds large
> quantities of
> memory. Obviously, this data type should be garbage collected
> as soon as
> possible to release resources.
This problem looks familiar. There have been long threads on the .NET
maillist and newsgroups about deterministic finalization.
Anyway, the one thing you can do is to provide two ways of deallocation: one
via GC, and one via a custom call which leaves the userdata floating around
but deallocates the large buffers. At GC time you simply check if the
buffers are still allocated or not.
WildHeart'2k - mailto:firstname.lastname@example.org
<<<Borrow money from a pessimist: ---
they don't expect it back.>>>