posted by Thom Holwerda on Mon 24th Aug 2009 15:06 UTC, submitted by diegocg
IconQt 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.
e p (2)    12 Comment(s)

Technology White Papers

See More