UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UObjectStats.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "HAL/Platform.h"
7#include <atomic>
8
9#if !defined(CSV_TRACK_UOBJECT_COUNT)
10#define CSV_TRACK_UOBJECT_COUNT 0
11#endif
12
13#if CSV_PROFILER_STATS && CSV_TRACK_UOBJECT_COUNT
14namespace UObjectStats
15{
16 extern COREUOBJECT_API std::atomic<int32> GUObjectCount;
17
19 {
20 GUObjectCount.fetch_add(1, std::memory_order_relaxed);
21 }
22
24 {
25 GUObjectCount.fetch_sub(1, std::memory_order_relaxed);
26 }
27
29 {
30 return GUObjectCount.load(std::memory_order_relaxed);
31 }
32}
33#endif
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127