Fix multiple memory leaks and stale pooled allocations (#123)

This commit is contained in:
Zero
2026-05-26 15:47:43 +03:00
committed by GitHub
parent 285fab70b2
commit 544befe162
7 changed files with 39 additions and 2 deletions
+6
View File
@@ -54,10 +54,16 @@ AABB *AABB::newPermanent(double x0, double y0, double z0, double x1, double y1,
void AABB::clearPool()
{
ThreadStorage *tls = static_cast<ThreadStorage *>(TlsGetValue(tlsIdx));
if (tls != nullptr)
{
tls->poolPointer = 0;
}
}
void AABB::resetPool()
{
clearPool();
}
AABB *AABB::newTemp(double x0, double y0, double z0, double x1, double y1, double z1)