mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Fix memory leak of Vector::setSize (#2781)
* Fix memory leak of Vector::setSize * Format code
This commit is contained in:
parent
4071565a9c
commit
f037c05b73
@ -85,6 +85,10 @@ namespace spine {
|
||||
for (size_t i = oldSize; i < _size; i++) {
|
||||
construct(_buffer + i, defaultValue);
|
||||
}
|
||||
} else {
|
||||
for (size_t i = _size; i < oldSize; i++) {
|
||||
destroy(_buffer + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user