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
(I discussed this "live" with @mjuhoor yesterday but for the record I'll post it here)
This can be fixed by refactoring this sort of function to take smart pointers, so that the caller does not need to worry about who owns the pointer, and can delete it on their side without a problem.
critical bug that causes lots of memory leaks:
vtkPolyData* mesh = ...
vtkMetaSurfaceMesh* metaMesh = ...
medAbstractData* data = ...
metaMesh->SetDataSet(mesh);
data->setData(metaMesh);
Looking at the source code of medInria, one can observe that:
Therefore, both 'mesh' and 'metaMesh' should be deleted.
In numerous cases, this rule is not respected, causing multiple memory leaks.
The text was updated successfully, but these errors were encountered: