<HTML><HEAD></HEAD>
<BODY dir=ltr>
<DIV dir=ltr>
<DIV style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<DIV>Does the memory location pointed by variable actor still contain a valid
object (e.g. reference count > 0) after actor->Delete()? If not,
then memory used by actor should have been released.</DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<DIV style="FONT: 10pt tahoma">
<DIV><FONT size=3 face=Calibri></FONT> </DIV>
<DIV><FONT size=3 face=Calibri>xz</FONT></DIV>
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=nicolas.lists@gmail.com
href="mailto:nicolas.lists@gmail.com">Nicolas Rannou</A> </DIV>
<DIV><B>Sent:</B> Tuesday, July 05, 2011 9:10 AM</DIV>
<DIV><B>To:</B> <A title=sebastien.jourdain@kitware.com
href="mailto:sebastien.jourdain@kitware.com">Sebastien Jourdain</A> </DIV>
<DIV><B>Cc:</B> <A title=vtkusers@public.kitware.com
href="mailto:vtkusers@public.kitware.com">vtkusers@public.kitware.com</A> </DIV>
<DIV><B>Subject:</B> Re: [vtkusers] Delete actor and release
memory</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">Hi
Sebastien,
<DIV> </DIV>
<DIV>Yes, I don't delete it on purpose.
<DIV> </DIV>
<DIV>I would like to keep the polydata in memory but delete everything else
which is related to the visualization in order to decrease the memory
usage!</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV> </DIV>
<DIV>Nicolas</DIV>
<DIV>
<DIV> </DIV>
<DIV class=gmail_quote>On Sat, Jul 2, 2011 at 11:19 PM, Sebastien Jourdain <SPAN
dir=ltr><<A
href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>You never deleted the sphere.<BR>
<DIV>
<DIV></DIV>
<DIV class=h5><BR>On Tue, Jun 28, 2011 at 5:56 PM, Nicolas Rannou <<A
href="mailto:nicolas.lists@gmail.com">nicolas.lists@gmail.com</A>>
wrote:<BR>> Hi all,<BR>> I would like to delete/remove actors from my
rendering window to free<BR>> memory.<BR>> The issue is that the memory
usage doesn't decrease after removing/deleting<BR>> the actors.<BR>>
From my understanding, both following pseudo-codes should use the same<BR>>
amount of memory.<BR>> But,<BR>> The first one uses: 15 Mb for 1000
spheres:<BR>> The second uses: 90 Mb for 1000 spheres:<BR>> How should I
proceed in the 2nd case, to get back to the "original" memory<BR>> usage
without actor?<BR>> Thanks,<BR>><BR>> Nicolas<BR>>
______________________________<BR>> 15 Mb<BR>>
______________________________<BR>> //Create a sphere<BR>>
vtkSphereSource* sphere = new ...<BR>>
______________________________<BR>> 90 Mb<BR>>
______________________________<BR>> //Create sphere<BR>>
vtkSphereSource* sphere = new ...<BR>> // mapper<BR>> vtkMapper* mapper
...<BR>> mapper->SetInput( sphere->GetOutput() )<BR>> //
actor<BR>> vtkActor* actor...<BR>> actor->SetMapper(mapper)<BR>>
mapper->Delete()<BR>> // Add and remove actor<BR>>
renderer->AddActor(actor)<BR>> renderer->RemoveActor(actor)<BR>>
// Delete actor<BR>> actor->Delete()<BR>>
______________________________<BR>>
______________________________<BR>><BR>><BR></DIV></DIV>>
_______________________________________________<BR>> Powered by <A
href="http://www.kitware.com"
target=_blank>www.kitware.com</A><BR>><BR>> Visit other Kitware
open-source projects at<BR>> <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:<BR>> <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>><BR></BLOCKQUOTE></DIV>
<DIV> </DIV></DIV></DIV>
<P>
<HR>
_______________________________________________<BR>Powered by
www.kitware.com<BR><BR>Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html<BR><BR>Please keep messages
on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR><BR>Follow
this link to
subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR></DIV></DIV></DIV></BODY></HTML>