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
@@ -49,10 +49,16 @@ Vec3 *Vec3::newPermanent(double x, double y, double z)
void Vec3::clearPool()
{
ThreadStorage *tls = static_cast<ThreadStorage *>(TlsGetValue(tlsIdx));
if (tls != nullptr)
{
tls->poolPointer = 0;
}
}
void Vec3::resetPool()
{
clearPool();
}
Vec3 *Vec3::newTemp(double x, double y, double z)