[Qt-interest] Question regarding pointer parameters in functions
Donal O'Connor
donaloconnor at gmail.com
Fri Jul 3 10:49:10 CEST 2009
No,
Only objects created on the stack in that function will be removed when
function ends.
2009/7/3 Patric <userqt at gmail.com>
> Hello,
> does anyone know what happens if we pass a pointer as parameter to function
> in QT ?
> Will the function release the memory of the object in the pointer, when it
> finish working with it ?
>
> For example
>
> void QStandardItemModel::appendRow ( QStandardItem * item ), if I call it
> the following way : appendRow(new QStandardItem("testItem"));
>
> Thank you in advance,
> Patric
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090703/79671431/attachment.html
More information about the Qt-interest-old
mailing list