You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.
Seokjin Lee edited this page Jun 18, 2020
·
3 revisions
Do not use new/delete. Use New<T>() and Delete<T>() instead. new[]/delete[] is replaced by NewArr<T>(), DeleteArr<T>().
Objects created with New<T>() must be paired and deleted with the same type Delete<T>(). This is because you have to return the memory to a pool of the same size as the pool you allocated. For the same reason, you must delete an array created with NewArr<T>() with the same size argument for DeleteArr<T>().
Static objects must use standard allocators. Because the memory pool is a static object, the memory pool can be deleted before the object.