Re: [wxVTK] memory leak when using wxWidgets and VTK
Brought to you by:
malat
|
From: Bangyou Z. <zhe...@gm...> - 2009-04-14 23:50:51
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Sorry for the duplicate message.<br>
This problem has solved by updating VTK to cvs version.<br>
<br>
Mathieu Malaterre wrote:
<blockquote
cite="mid:bf0...@ma..."
type="cite">
<pre wrap="">[you do not need to duplicate email, you will not get duplicate answer]
2009/4/14 Bangyou Zheng <a class="moz-txt-link-rfc2396E" href="mailto:zhe...@gm..."><zhe...@gm...></a>:
</pre>
<blockquote type="cite">
<pre wrap="">I have the similar problem about memory leak described by Premraj, Senthil
Kumar. The URL is :
<a class="moz-txt-link-freetext" href="http://sourceforge.net/mailarchive/forum.php?thread_name=CE95C4CC27808146AB22964FE8C94D66016D91462CAB%40IOWAEVS05.iowa.uiowa.edu&forum_name=wxvtk-users">http://sourceforge.net/mailarchive/forum.php?thread_name=CE95C4CC27808146AB22964FE8C94D66016D91462CAB%40IOWAEVS05.iowa.uiowa.edu&forum_name=wxvtk-users</a>
1) Problem description:
I need to redraw the vtkRenderer when users click the someplace of window.
Firstly, the all props were deleted:
m_Renderer->RemoveAllViewProps();
Then, these codes were used to redraw the vtkRenderer
vtkPoints * pts = vtkPoints::New();
vtkUnstructuredGrid * aTriangleGrid = vtkUnstructuredGrid::New();
vtkDataSetMapper * aTriangleMapper = vtkDataSetMapper::New();
vtkActor * Actor = vtkActor::New();
// some codes to create the Props
m_Renderer->AddViewProp( Actor );
pts->Delete();
aTriangleGrid->Delete();
aTriangleMapper->Delete();
Actor->Delete();
Finally, The memory usage was growing with redrawing the vtkRenderer
2) My environment
Windows XP SP2
mingw32-gcc-3.4.5
wxWidgets 2.8.9 linked as dll
VTK 5.0 linked as dll
wxVTKRenderWindowInteractor cvs version (up to now)
I know this problem can be avoided by using linker's /delayload flag of MFC,
but how to fix this problem for mingw?
Thanks a lot!
</pre>
</blockquote>
<pre wrap=""><!---->
I would think setting some renderer instance to NULL might help.
(->SetRenderer(NULL)).
HTH
</pre>
</blockquote>
<br>
</body>
</html>
|