[cffi-objects-cvs] r10 -

rklochkov at common-lisp.net rklochkov at common-lisp.net
Fri Aug 24 20:44:53 UTC 2012


Author: rklochkov
Date: Fri Aug 24 13:44:53 2012
New Revision: 10

Log:
Free pointed object on FREE method

Modified:
   object.lisp

Modified: object.lisp
==============================================================================
--- object.lisp	Fri Aug 24 12:26:53 2012	(r9)
+++ object.lisp	Fri Aug 24 13:44:53 2012	(r10)
@@ -73,6 +73,8 @@
   (unless (null-pointer-p (pointer object))
     (remhash (pointer-address (pointer object)) *objects*)
     (remhash (id object) *objects-ids*)
+    (when (and (slot-value object 'free-after) (not (null-pointer-p value)))
+      (free-ptr (class-of object) value))        
     (setf (pointer object) (null-pointer)
           (id object) nil)))
 




More information about the cffi-objects-cvs mailing list