[vtkusers] growing RAM memory
G G
greenlander1986 at gmail.com
Sun May 22 07:03:35 EDT 2011
When I use
ren = NULL;
ren = vtkSmartPointer<vtkRenderer>::New();
ren->SetBackground(1,1,1);
ren->AddActor(actor);
widget->GetRenderWindow()->AddRenderer(ren);
it works but, memory is grown again.
when I use
ren->Delete();
ren = vtkSmartPointer<vtkRenderer>::New();
ren->SetBackground(1,1,1);
ren->AddActor(actor);
widget->GetRenderWindow()->AddRenderer(ren);
it doesnt work.
I am desperate. :(
2011/5/22 G G <greenlander1986 at gmail.com>
> I am trying now. In VTK examples Examples\GUI\Qt\Events is in global scope
> only vtkRenderer... I have tried according this, but it crash in
> cout<<"bla"<<endl;
> ren = NULL;
>
> ren->SetBackground(1,1,1);
> ren->AddActor(actor);
> widget->GetRenderWindow()->AddRenderer(ren);
> cout<<"ups"<<endl;
> "bla" is written, but "ups" not. I have in all important method
> vtkSmartPointer<vtkRenderer> ren
>
> inicialization I do only ones, it is problem?
>
>
>
> 2011/5/21 G G <greenlander1986 at gmail.com>
>
>> Thank you, I try it. And post here solution
>>
>> 2011/5/21 chasank <chasank at gmail.com>
>>
>>> My suggestion is,
>>> if you do not need more than one renderer and RenderWindow
>>> - Define them in a global scope,
>>> - And before each call to the widgetInicialization method, set them to
>>> the
>>> NULL
>>> - in widgetInicialization method, Re-create them, set the values
>>> - Lastly update your widget object.
>>>
>>> --
>>> View this message in context:
>>> http://vtk.1045678.n5.nabble.com/growing-RAM-memory-tp4346305p4415624.html
>>> Sent from the VTK - Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110522/311d7101/attachment.htm>
More information about the vtkusers
mailing list