[serialize] Don't free object-pool in reset()
This commit is contained in:
parent
02949cf64f
commit
afd716d4cd
|
@ -35,15 +35,12 @@ template <typename T, unsigned ChunkLen = 16>
|
||||||
struct hb_pool_t
|
struct hb_pool_t
|
||||||
{
|
{
|
||||||
hb_pool_t () : next (nullptr) {}
|
hb_pool_t () : next (nullptr) {}
|
||||||
~hb_pool_t () { fini (); }
|
~hb_pool_t ()
|
||||||
|
|
||||||
void fini ()
|
|
||||||
{
|
{
|
||||||
next = nullptr;
|
next = nullptr;
|
||||||
|
|
||||||
for (chunk_t *_ : chunks) hb_free (_);
|
for (chunk_t *_ : chunks)
|
||||||
|
hb_free (_);
|
||||||
chunks.fini ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
T* alloc ()
|
T* alloc ()
|
||||||
|
|
|
@ -194,7 +194,6 @@ struct hb_serialize_context_t
|
||||||
current = current->next;
|
current = current->next;
|
||||||
_->fini ();
|
_->fini ();
|
||||||
}
|
}
|
||||||
object_pool.fini ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool in_error () const { return bool (errors); }
|
bool in_error () const { return bool (errors); }
|
||||||
|
|
Loading…
Reference in New Issue