Permalink
Browse files

Prevent memory leaks with default free function set to GLib.free.

Signed-off-by: Lewis Gunsch <lewis@gunsch.ca>
  • Loading branch information...
lgunsch committed Jun 13, 2012
1 parent ab690c3 commit 53613a79f17c4d303bf1f24bffdd6d391e92fd83
Showing with 2 additions and 2 deletions.
  1. +1 −1 examples/hwclient.vala
  2. +1 −1 libzmq.vapi
View
@@ -14,7 +14,7 @@ public static int main(string [] argv) {
requester.connect ("tcp://localhost:5555");
for (int request_nbr = 0; request_nbr != 10; request_nbr++) {
- var request = Msg.with_data ("Hello".data, null);
+ var request = Msg.with_data ("Hello".data);
stdout.printf ("Sending Hello %d\n", request_nbr);
requester.send (ref request, 0);
View
@@ -74,7 +74,7 @@ namespace ZMQ {
[CCode (cname = "zmq_msg_init_size")]
public Msg.with_size (size_t size);
[CCode (cname = "zmq_msg_init_data")]
- public Msg.with_data (owned uint8[] data, free_fn? ffn = null);
+ public Msg.with_data (owned uint8[] data, free_fn? ffn = GLib.free);
[CCode (cname = "zmq_msg_copy", instance_pos = -1)]
private int _copy (ref Msg dest);
[CCode (cname = "zmq_msg_copy_wrapper")]

0 comments on commit 53613a7

Please sign in to comment.