[vtkusers] Freeing up memory
rashedk
rashed.vtk at googlemail.com
Sat Aug 4 21:03:37 EDT 2007
Thanks Mike and Dominik. I didnt know smart pointers existed in VTK. I have
used them in ITK and they are great. Thanks again.
Dominik Szczerba wrote:
>
> I don't know why but why don't you use vtkSmartPointer's.
> - Dominik
>
> rashed karim wrote:
>> Hi VTK users,
>>
>> Inside a function I do this:
>> vtkRendererCollection* rendererCollection = renderWin->GetRenderers();
>>
>> Where I am basically getting the renderers associated with a rendering
>> window. Further down in the code I extract the renderer from the
>> collection
>> and delete any existing actors in the renderer and replace it with a new
>> actor.
>>
>> When exiting the function, I start freeing up the memory by invoking on
>> Delete( ) on the renderer, actor, etc. But here is where it gets all
>> wierd -
>> when I delete the rendererCollection object, I can no longer interact
>> with
>> my actor. Does anyone know why?
>>
>> Thanks
>> Rashed Karim.
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>
> --
> Dominik Szczerba, Ph.D.
> Computer Vision Lab CH-8092 Zurich
> http://www.vision.ee.ethz.ch/~domi
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
View this message in context: http://www.nabble.com/Freeing-up-memory-tf4217863.html#a12001401
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list