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
In IParticleMan_Active::Update forces that have timed out are supposed to be removed, but due to faulty logic the memory for these objects isn't actually freed.
Apparently when this code calls delete on the object, it first changes the pointer to the object to null, like this:
ForceMember* object = ...; //Physics force object, obtained earlier on
if (object has timed out)
{
object = nullptr;
delete object;
}
This causes a memory leak that will eventually crash the program.
There does not appear to be any code in official games using this particular method, but any mods that use it will be affected by the leak.
The text was updated successfully, but these errors were encountered:
The particle manager maintains a list of active physics forces added using this method:
halflife/public/particleman.h
Line 33 in c7240b9
In
IParticleMan_Active::Update
forces that have timed out are supposed to be removed, but due to faulty logic the memory for these objects isn't actually freed.Apparently when this code calls
delete
on the object, it first changes the pointer to the object to null, like this:This causes a memory leak that will eventually crash the program.
There does not appear to be any code in official games using this particular method, but any mods that use it will be affected by the leak.
The text was updated successfully, but these errors were encountered: