Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
fml::WeakPtrFactory< T > Class Template Reference

#include <weak_ptr.h>

Public Member Functions

 WeakPtrFactory (T *ptr)
 
 ~WeakPtrFactory ()
 
WeakPtr< TGetWeakPtr () const
 

Detailed Description

template<typename T>
class fml::WeakPtrFactory< T >

Definition at line 257 of file weak_ptr.h.

Constructor & Destructor Documentation

◆ WeakPtrFactory()

template<typename T >
fml::WeakPtrFactory< T >::WeakPtrFactory ( T ptr)
inlineexplicit

Definition at line 259 of file weak_ptr.h.

260 : ptr_(ptr), flag_(fml::MakeRefCounted<fml::internal::WeakPtrFlag>()) {
261 FML_DCHECK(ptr_);
262 }
#define FML_DCHECK(condition)
Definition: logging.h:103

◆ ~WeakPtrFactory()

template<typename T >
fml::WeakPtrFactory< T >::~WeakPtrFactory ( )
inline

Definition at line 264 of file weak_ptr.h.

264 {
265 CheckThreadSafety();
266 flag_->Invalidate();
267 }

Member Function Documentation

◆ GetWeakPtr()

template<typename T >
WeakPtr< T > fml::WeakPtrFactory< T >::GetWeakPtr ( ) const
inline

Definition at line 271 of file weak_ptr.h.

271 {
272 return WeakPtr<T>(ptr_, flag_.Clone(), checker_);
273 }
RefPtr< T > Clone() const
Definition: ref_ptr.h:184

The documentation for this class was generated from the following file: