[cells-gtk-devel] Re: Roberto

Dmitri Hrapof hrapof at common-lisp.ru
Thu Mar 13 05:38:28 UTC 2008


Peter Hildebrandt пишет:
> What is RAII?  I'm afraid I fail to parse your question, sorry.
>
> FWIW, foreign objects are allocated with foreign-allocate and freed 
> with foreign-free (or something the like).  with-foreign-object 
> encloses its body with calls to allocate and free the foreign object.  
> There is no such thing as a clos destructor.  You might look into 
> finalizers, which are related.
RAII is "Resource Acquisition Is Initialization" - a C++ idiom. 
Something is initialized within constructor and freed within destructor. 
Yes, it looks like TRIVIAL-GARBAGE is the way to go...

Cheers,
Dmitri



More information about the cells-gtk-devel mailing list