mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Guarded allocator: Override placement new operator
Allows to in-place construct objects which are using guarded allocator.
This commit is contained in:
parent
cdea648117
commit
468adfa4fd
1 changed files with 4 additions and 0 deletions
|
|
@ -239,6 +239,10 @@ void MEM_use_guarded_allocator(void);
|
|||
{ \
|
||||
if (mem) \
|
||||
MEM_freeN(mem); \
|
||||
} \
|
||||
void *operator new(size_t /*count*/, void *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
}
|
||||
|
||||
/* Needed when type includes a namespace, then the namespace should not be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue