[zeromq-dev] [CL patch] memory management fix

Vitaly Mayatskikh v.mayatskih at gmail.com
Wed Dec 16 13:51:02 CET 2009


Hi!

Lisp bindings manages message allocation automatically via object
finalizer. Thus callback zmq_free is not required and even may damage
lisp image.

diff --git a/bindings/cl/zeromq-api.lisp b/bindings/cl/zeromq-api.lisp
index 953b98b..b03e11f 100644
--- a/bindings/cl/zeromq-api.lisp
+++ b/bindings/cl/zeromq-api.lisp
@@ -37,7 +37,7 @@
 		   (string (foreign-string-alloc data))
 		   (array (values (foreign-alloc :uchar :initial-contents data)
 				  (length data))))
-	       (msg-init-data raw ptr len (callback zmq-free))))
+	       (msg-init-data raw ptr len (null-pointer))))
 	    (t (msg-init raw))))))
 
 (defclass pollitem ()

-- 
wbr, Vitaly



More information about the zeromq-dev mailing list