RealDocs

AActor::IsActorBeingDestroyed

function Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: UFUNCTIONBlueprintCallableconst

Description

Returns true if this actor is currently in the process of being destroyed. Use this as a guard in callbacks or deferred logic to avoid operating on a dying actor.

Caveats & Gotchas

  • This becomes true during the Destroy() call but before the actor is fully garbage-collected. Checking IsPendingKillOrUnreachable() or IsValid() is not an exact substitute — IsActorBeingDestroyed() specifically covers the in-progress teardown window.
  • Avoid expensive operations or state mutations when this returns true; the actor may have already begun releasing its resources and components may be in an invalid state.

Signature

UFUNCTION(BlueprintCallable, Category="Game")
bool IsActorBeingDestroyed() const

Return Type

bool

Example

Guard a timer callback against operating on a dying actor C++
void AMyActor::OnTimerFired()
{
    if (IsActorBeingDestroyed())
    {
        return;
    }
    // Safe to proceed
    DoSomething();
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.