UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMWeakKeyMapGuard.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#if WITH_VERSE_VM || defined(__INTELLISENSE__)
6
7
#include "
VVMHeapClientDataGuard.h
"
8
#include "
VVMWeakKeyMap.h
"
9
10
namespace
Verse
11
{
12
13
struct
FWeakKeyMapGuard
final
14
{
15
FWeakKeyMapGuard
(
FHeapPageHeader
*
Header
)
16
:
Guard
(
Header
)
17
{
18
}
19
20
FWeakKeyMap
* TryGet()
21
{
22
return
GetRef();
23
}
24
25
FWeakKeyMap
*
Get
()
26
{
27
if
(GetRef())
28
{
29
return
GetRef();
30
}
31
else
32
{
33
return
GetSlow
();
34
}
35
}
36
37
// Returns true if this page no longer has a weak key map.
38
// If this returns false, then it also accounts for the native memory usage of this map.
39
bool
ConductCensus
();
40
41
private
:
42
FWeakKeyMap
*
GetSlow
();
43
44
FWeakKeyMap
*& GetRef()
const
45
{
46
return
*
reinterpret_cast<
FWeakKeyMap
**
>
(
Guard
.GetClientDataPtr());
47
}
48
49
FHeapClientDataGuard
Guard
;
50
};
51
52
}
// namespace Verse
53
#endif
// WITH_VERSE_VM
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EPackageSegment::Header
@ Header
VVMHeapClientDataGuard.h
VVMWeakKeyMap.h
ObjectPtr_Private::Get
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition
ObjectPtr.h:426
Verse
Definition
Archive.h:36
Engine
Source
Runtime
CoreUObject
Public
VerseVM
VVMWeakKeyMapGuard.h
Generated by
1.9.8