Patch memory leak in Archetype::grow(). (#569)
This commit is contained in:
parent
f7c8882c04
commit
3abfcad7ab
@ -304,6 +304,13 @@ impl Archetype {
|
||||
new_data.as_ptr().add(new_off),
|
||||
ty.layout.size() * old_count,
|
||||
);
|
||||
dealloc(
|
||||
(*self.data.get()).as_ptr().cast(),
|
||||
Layout::from_size_align_unchecked(
|
||||
old_data_size,
|
||||
self.types.first().map_or(1, |x| x.layout.align()),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user