5#ifndef INCLUDE_CPPGC_EXPLICIT_MANAGEMENT_H_
6#define INCLUDE_CPPGC_EXPLICIT_MANAGEMENT_H_
10#include "cppgc/allocation.h"
11#include "cppgc/internal/logging.h"
12#include "cppgc/type-traits.h"
29class ExplicitManagementImpl
final {
32 V8_EXPORT static bool Resize(
void*, size_t);
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
62 static_assert(IsGarbageCollectedTypeV<T>,
63 "Object must be of type GarbageCollected.");
64 internal::ExplicitManagementImpl::FreeUnreferencedObject(heap_handle,
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
91 static_assert(IsGarbageCollectedTypeV<T>,
92 "Object must be of type GarbageCollected.");
93 return internal::ExplicitManagementImpl::Resize(
94 &object,
sizeof(T) + additional_bytes.value);
bool Resize(T &object, AdditionalBytes additional_bytes)
void FreeUnreferencedObject(HeapHandle &heap_handle, T &object)