[Qt-interest] Memory Management in Qt
Ramesh
ramesh.bs at robosoftin.com
Tue Oct 26 08:01:34 CEST 2010
HI all,
I have small doubt about Qt memory management,
Lets take an example of Listview, in listview we add each item by allocating
memory dynamically. So in this case do we need to delete all the "new"ed
items manually..
Eg:
Qlistview *list = new Qlistview;
QStandardItemModel *mModel = new QStandardItemModel();
list ->setModel(mModel);
for(int I =0;i<10;i++)
{
QsandardItem *item = new QsandardItem("Hi");
mModel->appendRow(item);
}
In this example, item should be deleted manually?
-----------------------------------------------
Robosoft Technologies - Come home to Technology
Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101026/44ac4e9d/attachment.html
More information about the Qt-interest-old
mailing list