[serialize] Actually reclaim storage from duplicate objects
This commit is contained in:
parent
3305a2cad2
commit
6215fb8e68
|
@ -198,6 +198,7 @@ struct hb_serialize_context_t
|
|||
obj->tail = head;
|
||||
obj->next = nullptr;
|
||||
unsigned len = obj->tail - obj->head;
|
||||
head = obj->head; /* Rewind head. */
|
||||
|
||||
if (!len)
|
||||
{
|
||||
|
@ -214,7 +215,6 @@ struct hb_serialize_context_t
|
|||
|
||||
tail -= len;
|
||||
memmove (tail, obj->head, len);
|
||||
head = obj->head;
|
||||
|
||||
obj->head = tail;
|
||||
obj->tail = tail + len;
|
||||
|
|
Loading…
Reference in New Issue