[vtkusers] QVTKWidget: How to free memory
Ang
ysa0829 at gmail.com
Tue Aug 18 09:09:22 EDT 2015
Hi all,
I create a widget named "TestVTKWidget " and the widget takes almost 10MB of
memory usage.
I try to free some by setting attribute to "Qt::WA_DeleteOnClose" but it
does not work. Any suggestion?
here is how I do.
//======TestVTKWidget .h=====//
class TestVTKWidget : public QWidget
{
Q_OBJECT
public:
TestVTKWidget(QWidget *parent = 0);
~TestVTKWidget();
private:
Ui::TestVTKWidget ui;
};
//======TestVTKWidget .h=====//
//======TestVTKWidget .cpp=====//
TestVTKWidget::TestVTKWidget(QWidget *parent)
: QWidget(parent)
{
ui.setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
}
TestVTKWidget::~TestVTKWidget()
{
}
//======TestVTKWidget .cpp=====//
//==========mian.cpp======//
#include "TestVTKWidget.h"
int main(int argc, char *argv[])
{
TestVTKWidget *test = new TestVTKWidget();
test->show();
}
//==========mian.cpp======//
thanks all.
Ang.
--
View this message in context: http://vtk.1045678.n5.nabble.com/QVTKWidget-How-to-free-memory-tp5733539.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list