[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to free the memory occupied by the instance object?
- To: Yao-Sheng Cheng <email@example.com>
- Subject: Re: How to free the memory occupied by the instance object?
- From: straz (Steve Strassmann)
- Date: Mon, 25 Jul 1994 12:57:19 -0400
- Cc: info-mcl
>From: Yao-Sheng Cheng <firstname.lastname@example.org>
> I am working to build a multimedia authoring system using MCL&CLOS.
>I have a problem that how to release the memory of objects created
>through make-instance. Does the MCL garbage collector is so clever to
>collect these memory back or I must explicitly call some functions to
>free these memory?
Yes, the MCL garbage collector is extremely clever. These objects
will be tracked automatically, and the memory will be reclaimed
when the objects are no longer used. An object is considered to
be "in use" if you can reach it by evaluating an expression, like
a global variable. So if you want an object to go away, make
sure it's not kept in a global variable, or indirectly referenced
You can invoke the garbage collector yourself by calling "(gc)",
but in general, you shouldn't need to. It'll run when it needs to,