memory tracer - fix memory accumulation of children

This commit is contained in:
Matthias Hochsteger 2020-11-25 14:34:29 +01:00
parent b55264e0ee
commit 91f127ef71

View File

@ -1068,9 +1068,8 @@ namespace ngcore
{
// reverse topological order to accumulate total memory usage of all children
auto i = sorting[sorting.Size()-1-i_];
if(parents[i]==-1)
root.size += nodes[i]->size;
else
if(i==0)
continue;
nodes[parents[i]]->size += nodes[i]->size;
}