Navigation
Unreal Engine C++ API Reference > Runtime > Core > ProfilingDebugging
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/ProfilingDebugging/InstanceCounter.h |
Include | #include "ProfilingDebugging/InstanceCounter.h" |
Syntax
class FInstanceCountingObject
Remarks
A helper object for counting instances of struct or classes for debugging purposes, e.g. to get an absolute count of the number of "Foo"'s in existence
Suggested use
class UFoo { public: etc etc protected: COUNT_INSTANCES(FTypeIWantToCount) };
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
bool | DoLog | Log increment/decrement? |
![]() |
FName | Name | Name we are tracking |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
FInstanceCountingObject
(
const FInstanceCountingObject& RHS |
Copy-constructor for assigment | |
![]() |
FInstanceCountingObject
(
const TCHAR* InName, |
Constructor, though geneerally these objects should be created using the COUNT_INSTANCES_ macro. |
Destructors
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Destructor |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Decrements stats for objects of this type | |
![]() ![]() |
FGlobalVars & | GetGlobals () |
|
![]() ![]() |
int32 | GetInstanceCount
(
const TCHAR* Name |
Returns the count of instances with "Name". |
![]() |
void | Increments stats for objects of this type | |
![]() ![]() |
void | LogCounts
(
FOutputDevice& OutputDevice |
Dumps stats for all counted instances to the provided output device. |
Classes
Type | Name | Description | |
---|---|---|---|
![]() |
FGlobalVars | Vars used by our singleton |
Constants
Name | Description |
---|---|
Globals | Vars are stored as a pointer and initialized on demand due to avoid dependencies on global crot order |