mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-14 15:05:37 +02:00
@@ -100,6 +100,7 @@ int main(void) {
|
||||
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
|
||||
|
||||
/* cleaning */
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
msgpack_sbuffer_free(buffer);
|
||||
msgpack_packer_free(pk);
|
||||
}
|
||||
@@ -139,6 +140,7 @@ int main(void) {
|
||||
/* prints the deserialized object. */
|
||||
msgpack_object obj = msg.data;
|
||||
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
puts("");
|
||||
}
|
||||
|
||||
|
@@ -25,6 +25,7 @@ void test()
|
||||
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
|
||||
}
|
||||
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
msgpack_sbuffer_destroy(&buf);
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,7 @@ void test()
|
||||
|
||||
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
|
||||
}
|
||||
|
||||
msgpack_unpacked_destroy(&msg);
|
||||
msgpack_sbuffer_destroy(&buf);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user