On Sun, May 8, 2011 at 1:39 PM, Nitralime <nitral...@googlemail.com> wrote: > What would be a correct solution to avoid memory leaks in this situation? > Using a finalizer seems to be a possible way to go. But I'm not sure how > this can be done by just using the finalizer parameters "object" and > "function" > where "function" can't reliablely access "object" (cf. documentation of > finalizer > in "trivial-garbage" package)!!
Here's some pseudo-code to achieve what you're looking for: (let ((ptr (grab-your-table-pointer))) (tg:finalize your-wrapper-object (lambda () (table-free ptr)))) HTH, -- Luís Oliveira http://r42.eu/~luis/ _______________________________________________ cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel