We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63d26a8 commit 0df8476Copy full SHA for 0df8476
1 file changed
src/util/ralloc.h
@@ -434,6 +434,17 @@ public: \
434
return p; \
435
} \
436
\
437
+ static void operator delete(void *p, void *mem_ctx) \
438
+ { \
439
+ /* The object's destructor is guaranteed to have already been \
440
+ * called by the delete operator at this point -- Make sure it's \
441
+ * not called again. \
442
+ */ \
443
+ if (!HAS_TRIVIAL_DESTRUCTOR(TYPE)) \
444
+ ralloc_set_destructor(p, NULL); \
445
+ ralloc_free(p); \
446
+ } \
447
+ \
448
static void operator delete(void *p) \
449
{ \
450
/* The object's destructor is guaranteed to have already been \
0 commit comments