[vtkusers] growing RAM memory
G G
greenlander1986 at gmail.com
Sat May 21 13:50:12 EDT 2011
Thank you for answer. Do you give me some other hint, please? I rewrite to
this
void Window::widgetInicialization(QVTKWidget *widget)
{
vtkSmartPointer<vtkRenderWindow> renwin =
vtkSmartPointer<vtkRenderWindow>::New();
vtkSmartPointer<vtkRenderer> ren = vtkSmartPointer<vtkRenderer>::New();
ren->SetBackground(1,1,1); // inicial white background
renwin->AddRenderer(ren);
widget->SetRenderWindow(renwin);
widget->update();
//renwin->Delete();
}
But I didnt free memory :( When I load image I gave about 40MB in RAM
memory. When I load new image memory increase for example to 80MB (it
depends which data is used)
When I load more data image program have 1,4GB RAM :(
Thank you for each answer
2011/5/21 chasank <chasank at gmail.com>
> Use vtkSmartPointer to handle the memory in best way, it's simple usage is
> like that;
> vtkSmartPointer < vtkClass > vtkObj = vtkSmartPointer < vtkClass > ::
> New();
> vtkSmartPointer, checks if an object is out of scope, it releases memory
> resource taken for that object automatically.
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/growing-RAM-memory-tp4346305p4415310.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/20110521/28618847/attachment.htm>
More information about the vtkusers
mailing list