Hi,
Probably this was asked before, or probably you will find this question somewhat stupid, nevertheless.
Is there any kind of a tutorial or a guide into how to achieve automatic garbage collection of the native objects referenced from Lisp objects?
So far I found just this thread that contains useful information in tiny bits but not a coherent cookbook style guide:
http://lists.common-lisp.net/pipermail/cffi-devel/2011-May/003541.html
Thanks, Victor
On Tue, 01 Oct 2013 12:34:34 +0300, Victor said:
Hi,
Probably this was asked before, or probably you will find this question somewhat stupid, nevertheless.
Is there any kind of a tutorial or a guide into how to achieve automatic garbage collection of the native objects referenced from Lisp objects?
So far I found just this thread that contains useful information in tiny bits but not a coherent cookbook style guide:
http://lists.common-lisp.net/pipermail/cffi-devel/2011-May/003541.html
IMHO, this is a misguided approach (see my replies to that thread) so it is probably good that there is no cookbook style guide :-) You need to determine when the native objects are no longer needed by your code and free them explicitly.
__Martin
On Tue, Oct 1, 2013 at 1:25 PM, Martin Simmons martin@lispworks.com wrote:
IMHO, this is a misguided approach (see my replies to that thread) so it is probably good that there is no cookbook style guide :-) You need to determine when the native objects are no longer needed by your code and free them explicitly.
Victor, what's your use case? Maybe it can serve as a good example of how finalizers might be attractive and what an alternative solution might look like.
Cheers,