Version: 2023.2
LanguageEnglish
  • C#

AtomicSafetyHandle.IsDefaultValue

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static bool IsDefaultValue(ref Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle);

Parameters

handle Safety handle.

Returns

bool true if the handle has not yet been initialized and still has its default value; false otherwise.

Description

Check if the handle still has its default value (i.e. has not yet been initialized by being assigned or passed to AtomicSafetyHandle.Create).

By default, an AtomicSafetyHandle variable is not initialised, which means it does not reference any central record and has not stored a version number. This changes when you pass the variable to AtomicSafetyHandle.Create, or when you assign it from an existing initialised AtomicSafetyHandle.