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

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -