mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #1413 from Azaezel/LittleLeakLost
partial reversion for #1333
This commit is contained in:
commit
8f4295879d
|
|
@ -215,13 +215,21 @@ void Profiler::reset()
|
|||
{
|
||||
mEnabled = false; // in case we're in a profiler call.
|
||||
ProfilerData * head = mProfileList;
|
||||
ProfilerData * curr = NULL;
|
||||
while ((curr = head) != NULL)
|
||||
ProfilerData * curr = head;
|
||||
|
||||
while ( curr )
|
||||
{
|
||||
head = head->mNextProfilerData;
|
||||
free(curr);
|
||||
head = curr->mNextProfilerData;
|
||||
free( curr );
|
||||
|
||||
if ( head )
|
||||
curr = head;
|
||||
else
|
||||
curr = NULL;
|
||||
}
|
||||
|
||||
mProfileList = NULL;
|
||||
|
||||
for(ProfilerRootData *walk = ProfilerRootData::sRootList; walk; walk = walk->mNextRoot)
|
||||
{
|
||||
walk->mFirstProfilerData = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue