<div dir="ltr"><div class="gmail_quote">I just compiled and ran your program with valgrind.</div><div class="gmail_quote">No leaks at all.</div><div class="gmail_quote"><br></div><div class="gmail_quote">What OS are your running? What compiler version? What version of VTK?</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">we run valgrind every night on vtk's test suite. We do have to pro dive suppressions for some rendering false alarms. But your simple program does not need and suppressions.</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Bill</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Jan 10, 2014 8:10 AM, "Liesbeth Vanherpe" <<a href="mailto:liesbeth.vanherpe@gmail.com" target="_blank">liesbeth.vanherpe@gmail.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div>Dear mailing list,<br><br></div><div><br>I'm running into a problem involving vtkSmartPointer and valgrind complaints.<br><br></div>Here is a minimal code example of what doesn't seem to work:<br>
<br></div><div>======== main.cpp ===========<br></div><div>#include <vtkSmartPointer.h><br>#include <vtkDataSetMapper.h><br><br>int main(int argc, char ** argv)<br>{<br> vtkSmartPointer<vtkDataSetMapper> dataSetMapper = vtkSmartPointer<vtkDataSetMapper>::New();<br>
<br> return 0;<br>}<br>======== CMakeLists.txt ===========<br>cmake_minimum_required(VERSION 2.8)<br>project(main)<br><br>set(CMAKE_BUILD_TYPE Debug)<br>set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")<br>
<br>find_package(VTK REQUIRED)<br>include(${VTK_USE_FILE})<br><br>add_executable(main main.cpp)<br><br>target_link_libraries(main ${VTK_LIBRARIES})<br>======================<br><br></div>Both cmake and compiling run fine. Next, when I run "valgrind --leak-check=full ./main", there are plenty of messages about "possibly lost" blocks.<br>
</div><br></div>When I replace "vtkDataSetMapper" by e.g. "vtkIdList", valgrind has no complaints. When I replace "vtkDataSetMapper" by "vtkRenderWindow", valgrind gives me similar error messages.<br>
<br></div><div>I have installed VTK 5.8.<br></div><div><br></div>What am I missing?<br><br><br></div>Regards,<br><br>Liesbeth Vanherpe<br></div>
<br>_______________________________________________<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/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_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/listinfo/vtkusers</a><br>
<br></blockquote></div>
</div>