On Thu, Dec 13, 2012 at 7:50 PM, Peter Enerccio <enerc...@gmail.com> wrote:

> Is it possible for automatic memory reclamation when object is no longer
> needed (ie it's parent foreign type has been disposed in the ecl memory)?
>

This is called finalization and it happens automatically for all lisp
objects


> Or the same equivalent for defclass made class instance.
>

They are automatically garbage collected.


> The reason being, in sdl, you must call SDL_FreeSurface when it's no
> longer needed and it would be appropriate to call it when object holding
> the reference to it (or class holding the reference to the object) is being
> disposed by the system.
>

You have to associate a function with the object you want to clean up
before garbage collection: http://ecls.sourceforge.net/new-manual/ch28.html

Beware that this is expensive.

Juanjo

-- 
Instituto de FĂ­sica Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to