FMessageEndpoint::SafeRelease

Safely releases a message endpoint that is receiving messages on AnyThread.

Windows
MacOS
Linux

References

Module

MessagingCommon

Header

/Engine/Source/Runtime/MessagingCommon/Public/MessageEndpoint.h

Include

#include "MessageEndpoint.h"

Syntax

static void SafeRelease
(
    TSharedPtr< FMessageEndpoint, ESPMode::ThreadSafe > & Endpoint
)

Remarks

Safely releases a message endpoint that is receiving messages on AnyThread.

When an object that owns a message endpoint receiving on AnyThread is being destroyed, it is possible that the endpoint can outlive the object for a brief period of time if the Messaging system is dispatching messages to it. This helper function is to block the calling thread while any messages are being dispatched, so that the endpoint does not invoke any message handlers after the object has been destroyed.

Parameters

Parameter

Description

Endpoint

The message endpoint to release.

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