Skip to content

Commit 4bc64de

Browse files
committed
Fixed #948.
Added msgpack_unpacked_destroy() call.
1 parent 08a42a3 commit 4bc64de

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

QUICKSTART-C.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ int main(void) {
100100
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
101101

102102
/* cleaning */
103+
msgpack_unpacked_destroy(&msg);
103104
msgpack_sbuffer_free(buffer);
104105
msgpack_packer_free(pk);
105106
}
@@ -139,6 +140,7 @@ int main(void) {
139140
/* prints the deserialized object. */
140141
msgpack_object obj = msg.data;
141142
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
143+
msgpack_unpacked_destroy(&msg);
142144
puts("");
143145
}
144146

example/speed_test_uint32_array.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ void test()
2525
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
2626
}
2727

28+
msgpack_unpacked_destroy(&msg);
2829
msgpack_sbuffer_destroy(&buf);
2930
}
3031

example/speed_test_uint64_array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void test()
2525

2626
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
2727
}
28-
28+
msgpack_unpacked_destroy(&msg);
2929
msgpack_sbuffer_destroy(&buf);
3030
}
3131

0 commit comments

Comments
 (0)