QScopedPointer or QSharedPointer depending on your desired usage. These are close analogues of std::auto_ptr and std::shared_ptr
Which destructors get called in the event of abnormal termination of a C++ program is dependent on a number of factors. All memory allocated to a program will typically be reclaimed by the operating system but other cleanup may not occur.
Bookmarks