Flutter Engine
fml::WeakPtrFactory< T > Class Template Reference

#include <weak_ptr.h>

Public Member Functions

 WeakPtrFactory (T *ptr)
 
 ~WeakPtrFactory ()
 
WeakPtr< T > GetWeakPtr () const
 

Detailed Description

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

Definition at line 31 of file weak_ptr.h.

Constructor & Destructor Documentation

◆ WeakPtrFactory()

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

Definition at line 239 of file weak_ptr.h.

240  : ptr_(ptr), flag_(fml::MakeRefCounted<fml::internal::WeakPtrFlag>()) {
241  FML_DCHECK(ptr_);
242  }
#define FML_DCHECK(condition)
Definition: logging.h:86

◆ ~WeakPtrFactory()

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

Definition at line 244 of file weak_ptr.h.

244  {
245  CheckThreadSafety();
246  flag_->Invalidate();
247  }

Member Function Documentation

◆ GetWeakPtr()

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

Definition at line 251 of file weak_ptr.h.

251  {
252  return WeakPtr<T>(ptr_, flag_.Clone(), checker_);
253  }
RefPtr< T > Clone() const
Definition: ref_ptr.h:180

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