Gnash
0.8.11dev
|
#include <GnashScopedPtr.h>
Public Member Functions | |
ScopedPtr (T *ptr, DeleterT d) | |
T & | operator* () const |
Dereferences the managed pointer and returns a reference. More... | |
T * | operator-> () const |
Dereference the contained pointer. More... | |
T * | get () const |
Obtain the contained pointer. More... | |
~ScopedPtr () | |
ScopedPtr is very similar to scoped_ptr, but includes the Deleter functionality from shared_ptr. ScopedPtr can be used to implement the RAII pattern for C APIs, which frequently have their own deallocation strategy, when shared_ptr semantics are not desirable. ScopedPtr is similar to C++11's unique_ptr, but the deleter is not part of the type.
|
inlineexplicit |
Construct a ScopedPtr and provide a deleter.
the pointer to exclusively manage. the deleter to call when this object goes out of scope. The expression d(ptr) must be well-formed.
|
inline |
|
inline |
Obtain the contained pointer.
Referenced by gnash::Socket::connect().
|
inline |
Dereferences the managed pointer and returns a reference.
|
inline |
Dereference the contained pointer.