[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gc and deallocation
- To: info-mcl@ministry.cambridge.apple.com
- Subject: Re: gc and deallocation
- From: tar@ISI.EDU (Thomas A. Russ)
- Date: 5 Jan 94 10:15:44
- Distribution: world
- In-reply-to: bill@cambridge.apple.com's message of Wed, 5 Jan 1994 12:11:54 -0600
- Newsgroups: comp.lang.lisp.mcl
- Organization: USC-ISI
- References: <9401051709.AA08577@cambridge.apple.com>
- Reply-to: tar@isi.edu
In article <...> bill@cambridge.apple.com (Bill St. Clair) writes:
> At 10:40 PM 1/4/94 -0500, Robert Bruce Findler wrote:
>>What happens to memory that is allocated in a clos object when the
>>object is gc'ed? Is there a method that should be defined to clean-up
>>after the object? Some sort of deallocate-instance?
>
> When a CLOS object is garbage collected, it's memory is freed for reuse.
> The memory of the objects in its slots will also be freed if those objects
> are not referenced by any other live objects. MCL's garbage collector
> does not support an explicit user-specifiable clean-up procedure.
> You normally don't need one, though some applications, e.g. persistent
> object databases, can benefit from such a feature.
>
I would imagine that if you have pointers into the Macintosh heap that
were stored in the CLOS object you would end up with a memory leak if
you didn't have some disposal routine of your own. If you do this, then
you will need to explicitly deallocate the Macintosh heap memory.
--
________________________________________________________________________
Thomas A. Russ, USC/Information Sciences Institute tar@isi.edu
4676 Admiralty Way, Marina del Rey, CA 90292 (310) 822-1511x775