c++ - Is it possible to delete a dereferenced Pointer -
i have legacy code object dynamically allocated , emitted:
qlist<myclass *> *list = new qlist<myclass *>(); ... emit listready(*row); void otherclass::slotlist(qlist<myclass> list) { ... delete list??? }
i can delete objects in list , can clear list, possible delete list itsef in slot?
is possible delete list itsef in slot?
no, it's not possible. because slot accept list value, copy of original qlist<myclass *> *list
object.
void otherclass::slotlist(qlist<myclass> list)
to able delete list
object should change slotlist
arguments accept pointer list
.
Comments
Post a Comment