<div dir="ltr"><div><div><div><div><div><div>I am not sure enabling VTK_DEBUG_LEAKS for a single project will help. Personally I enabled appropriate option in CMAKE when building VTK.<br></div>It does work for a version I am working with (5.8.0 )<br>
<br></div>It is easy to check. Write a simple program (get any test) which instantiate any vtkObject subclass and exit.<br></div>If you do not see message box with leaks report your vtk is not configured right.<br></div>
<div>AFAIK there were some changes in later version, so comments above may not be relevant to your version though.<br></div><div><br></div>I do not think delay load option may affect this. All you need is to make sure they are loaded before any vtk object is instantiated.<br>
</div>To be sure load them normally for test purposes.<br><br></div><div>Regards,<br></div><div><br></div>Alex<br><div><div><div> <br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 2, 2013 at 12:13 PM, Mike Gagnon <span dir="ltr"><<a href="mailto:mike@gagnon.com" target="_blank">mike@gagnon.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi vtk pros!<br>
<br>
I am getting a lot of memory leaks in my code - and I've replaced every possible call to vtkWhateverObject::New to vtkSmartPointer<<u></u>vtkWhateverObject>::New (and commented out all calls to corresponding Deletes().<br>
<br>
I'm thinking these must be false positives. I tried to rebuild the vtkCommon project with the -DVTK_DEBUG_LEAKS flag set - and I also set this flag in my own project - but I don't get the window showing memory leaks. Have I done this right to see memory leaks?<br>
<br>
Also, I've copied the project settings from the sample that was built from a CMake-generated project. Amongst other project settings, the following dlls are under the DelayLoad properties: vtkRendering.dll;vtkIO.dll;<u></u>vtkFiltering.dll;vtkCommon.<u></u>dll. I mention this because I read somewhere that the order of libraries loaded somehow affects the memory leak reporting...<br>
<br>
I'd like to figure out how to see zero leaks in the output window (VS2012) like I see in the vtk samples so that I can see when I get any other (real?) leaks...<br>
<br>
Thanks a lot,<br>
Mike<br>
______________________________<u></u>_________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/<u></u>listinfo/vtkusers</a><br>
</blockquote></div><br></div>