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"
29 class ExplicitManagementImpl
final {
31 V8_EXPORT static void FreeUnreferencedObject(HeapHandle&,
void*);
32 V8_EXPORT static bool Resize(
void*, size_t);
62 static_assert(IsGarbageCollectedTypeV<T>,
63 "Object must be of type GarbageCollected.");
64 internal::ExplicitManagementImpl::FreeUnreferencedObject(heap_handle,
91 static_assert(IsGarbageCollectedTypeV<T>,
92 "Object must be of type GarbageCollected.");
93 return internal::ExplicitManagementImpl::Resize(
94 &object,
sizeof(T) + additional_bytes
.value);