mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: ObjectsPool missing destructor call
This commit is contained in:
parent
b1312c354d
commit
c951d787b7
1 changed files with 1 additions and 0 deletions
|
|
@ -39,6 +39,7 @@ namespace util {
|
|||
freeObjects.pop();
|
||||
new (ptr)T(std::forward<Args>(args)...);
|
||||
return std::shared_ptr<T>(reinterpret_cast<T*>(ptr), [this](T* ptr) {
|
||||
ptr->~T();
|
||||
std::lock_guard lock(mutex);
|
||||
freeObjects.push(ptr);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue