TSharedFromThis::DoesSharedInstanceExist

Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared).

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/SharedPointer.h

Include

#include "Templates/SharedPointer.h"

Syntax

bool DoesSharedInstanceExist() const

Remarks

Checks whether our referenced instance is valid (ie, whether it's safe to call AsShared). If this returns false, it means that your instance has either:

  • Not yet been assigned to a shared pointer (via MakeShared or MakeShareable).

  • Is currently within its constructor (so the shared instance isn't yet available).

  • Is currently within its destructor (so the shared instance is no longer available).

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss