Smart Pointers
Jump to navigation
Jump to search
Smart Pointers
Purpose
Smart pointer is an abstract data type that has all features of a standard pointer and additionally provides automatic garbage collection. Smart pointers facilitate the dynamic memory operations. Their main advantage is reducing memory leaks and bugs due to poor memory management.
Smart Pointers in Qt
- QPointer [qt.io]
- QSharedDataPointer [qt.io]
- QExplicitlySharedDataPointer [qt.io]
- QtPatternist::AutoPtr (internal class)
- QSharedPointer [qt.io]
- QWeakPointer [qt.io]
- QGuard (internal class)
- QScopedPointer [qt.io]
See also
Count with me: how many smart pointer classes does Qt have? [blog.qt.io]
References
Smart Pointer [en.wikipedia.org]
Boost Shared Pointer [anavi.org]