template <typename T>
class WeakPtr
Defined at line 40 of file ../../src/lib/fxl/memory/weak_ptr.h
Class for "weak pointers" that can be invalidated. Valid weak pointers can
only originate from a |WeakPtrFactory| (see below), though weak pointers are
copyable and movable.
Weak pointers are not in general thread-safe. They may only be *used* on a
single thread, namely the same thread as the "originating" |WeakPtrFactory|
(which can invalidate the weak pointers that it generates).
However, weak pointers may be passed to other threads, reset on other
threads, or destroyed on other threads. They may also be reassigned on other
threads (in which case they should then only be used on the thread
corresponding to the new "originating" |WeakPtrFactory|).
Public Methods
void WeakPtr<T> ()
Defined at line 44 of file ../../src/lib/fxl/memory/weak_ptr.h
void WeakPtr<T> (std::nullptr_t )
Defined at line 45 of file ../../src/lib/fxl/memory/weak_ptr.h
void WeakPtr<T> (const WeakPtr<T> & r)
Copy constructor.
Defined at line 48 of file ../../src/lib/fxl/memory/weak_ptr.h
template <typename U>
void WeakPtr<T> (const WeakPtr<U> & r)
Defined at line 51 of file ../../src/lib/fxl/memory/weak_ptr.h
void WeakPtr<T> (WeakPtr<T> && r)
Move constructor.
Defined at line 54 of file ../../src/lib/fxl/memory/weak_ptr.h
template <typename U>
void WeakPtr<T> (WeakPtr<U> && r)
Defined at line 57 of file ../../src/lib/fxl/memory/weak_ptr.h
void ~WeakPtr<T> ()
Defined at line 59 of file ../../src/lib/fxl/memory/weak_ptr.h
WeakPtr<T> & operator= (const WeakPtr<T> & r)
Copy assignment.
Defined at line 65 of file ../../src/lib/fxl/memory/weak_ptr.h
WeakPtr<T> & operator= (WeakPtr<T> && r)
Move assignment.
Defined at line 68 of file ../../src/lib/fxl/memory/weak_ptr.h
void reset ()
Defined at line 70 of file ../../src/lib/fxl/memory/weak_ptr.h
bool operator bool ()
The following methods should only be called on the same thread as the
"originating" |WeakPtrFactory|.
Defined at line 75 of file ../../src/lib/fxl/memory/weak_ptr.h
T * get ()
Defined at line 77 of file ../../src/lib/fxl/memory/weak_ptr.h
T & operator* ()
Defined at line 79 of file ../../src/lib/fxl/memory/weak_ptr.h
T * operator-> ()
Defined at line 84 of file ../../src/lib/fxl/memory/weak_ptr.h
Friends
template <typename U>
class WeakPtr