From b33ecbd92baa866803e34e9d7f1148007b16f180 Mon Sep 17 00:00:00 2001 From: frsyuki Date: Sun, 1 Mar 2009 02:55:45 +0900 Subject: msgpack_zone_clear, msgpack::zone::clear --- cpp/unpack.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cpp/unpack.hpp') diff --git a/cpp/unpack.hpp b/cpp/unpack.hpp index 38ac7ac..324111a 100644 --- a/cpp/unpack.hpp +++ b/cpp/unpack.hpp @@ -64,6 +64,9 @@ public: // otherwise the memrory will leak. zone* release_zone(); + /*! 5.2. this method is equivalence to `delete release_zone()` */ + void reset_zone(); + /*! 5.3. after release_zone(), re-initialize unpacker */ void reset(); @@ -217,6 +220,11 @@ inline zone* unpacker::release_zone() return r; } +inline void unpacker::reset_zone() +{ + msgpack_unpacker_reset_zone(this); +} + inline void unpacker::reset() { msgpack_unpacker_reset(this); -- cgit v1.2.1