Linked by Thom Holwerda on Mon 24th Aug 2009 15:06 UTC, submitted by diegocg
Qt Qt usually takes the boring memory allocation and deallocation from you, either through its implicitly shared containers, or with QObject's parent child relationship model. But every once in a while, we need to allocate something on the heap, and then the stress starts - where do we delete it, and how do we make sure to not leak the memory? To fix this problem, QScopedPointer was born. It will delete the object it is pointing to automatically when it goes out of scope.
Share this story

Your Name:

Your Email:

Your Friend's Email:

Please confirm the image:
Captcha