[vtkusers] growing RAM memory
G G
greenlander1986 at gmail.com
Sat May 21 12:35:27 EDT 2011
Do you know somebody please?
2011/4/28 G G <greenlander1986 at gmail.com>
> Hi, I loading data to QVTKWidget
> I have some inicialization method.
>
> void GUI::widgetInicialization(QVTKWidget *widget, vtkRenderer *ren)
> {
> vtkRenderWindow *renwin = vtkRenderWindow::New();
> ren = vtkRenderer::New();
> renwin->AddRenderer(ren);
> widget->SetRenderWindow(renwin);
> widget->update();
> renwin->Delete();
> }
>
> Then I load some data and display it...
>
> vtkSmartPointer<vtkRenderer> renderer =
> vtkSmartPointer<vtkRenderer>::New();
> renderer->AddActor(actor);
> widget->GetRenderWindow()->AddRenderer(renderer);
> widget->GetRenderWindow()->Render();
>
> But when I load some data previous data stay in renderer? How to delete
> renderer?
> I try before each data loading call this method...
>
> void GUI::widgetInicialization(QVTKWidget *widget, vtkRenderer *ren)
> {
> try
> {
> widget->GetRenderWindow()->Delete();
> }
> catch(...)
> {}
> vtkRenderWindow *renwin = vtkRenderWindow::New();
> ren = vtkRenderer::New();
> renwin->AddRenderer(ren);
> widget->SetRenderWindow(renwin);
> widget->update();
> renwin->Delete();
> }
>
> but any reasons :(
> Do you hepl me please how to delete renderers?
>
> Thank you
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110521/07927bf0/attachment.htm>
More information about the vtkusers
mailing list