Skip to content

Commit 21b8749

Browse files
committedNov 20, 2024
8344479: Declare MetaspaceObj::operator delete to be deleted
Reviewed-by: stefank, kbarrett, jwaters
1 parent ea7e722 commit 21b8749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/hotspot/share/memory/allocation.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class MetaspaceObj {
353353
void* operator new(size_t size, ClassLoaderData* loader_data,
354354
size_t word_size,
355355
Type type) throw();
356-
void operator delete(void* p) { ShouldNotCallThis(); }
356+
void operator delete(void* p) = delete;
357357

358358
// Declare a *static* method with the same signature in any subclass of MetaspaceObj
359359
// that should be read-only by default. See symbol.hpp for an example. This function

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Nov 20, 2024

@openjdk-notifier[bot]
Please sign in to comment.