25 template <CSharedOrWeak T>
29 template <CSharedOrWeak T>
33 template <CSharedOrWeak T>
45 template <
typename T,
typename... Args>
48 object.Initialize(Forward<Args>(args)...);
61 template <
typename T, ESPMode Mode = ESPMode::ThreadSafe,
typename... Args>
65 TSharedRef<T, Mode> result = MakeShareable(newObject);
66 result->Initialize(Forward<Args>(args)...);
92 CFunctorObject Initializer,
94 ESPMode Mode = ESPMode::ThreadSafe,
96 typename Result = std::decay_t<ResultArg>
98 requires std::is_lvalue_reference_v<ResultArg>
102 return MakeShareable(
103 ConstructNew(Forward<Initializer>(init), Forward<Args>(args)...)
113 template <CRefCounted T, ESPMode Mode = ESPMode::ThreadSafe>
118 return MakeShareable(
object, [](T*
object) {
object->Release(); });
128 ESPMode Mode =
decltype(DeclVal<T const>().AsShared())::Mode
130 auto WeakSelf(
const T* self) -> TWeakPtr<T const, Mode>
132 return StaticCastSharedRef<T const>(self->AsShared());
142 ESPMode Mode =
decltype(DeclVal<T>().AsShared())::Mode
146 return StaticCastSharedRef<T>(self->AsShared());