Skip to content

Commit

Permalink
core, refactor: use ::operator new/delete instead of new uint8_t[].
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed May 31, 2023
1 parent 32c0c2d commit cf794b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fibjs/src/base/Isolate.cpp
Expand Up @@ -107,12 +107,12 @@ class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator {

virtual void* AllocateUninitialized(size_t length)
{
return new uint8_t[length];
return ::operator new(length);
}

virtual void Free(void* data, size_t)
{
delete[] static_cast<uint8_t*>(data);
::operator delete(data);
}
};

Expand Down

0 comments on commit cf794b4

Please sign in to comment.