github-actions[bot] commented on code in PR #38960: URL: https://github.com/apache/doris/pull/38960#discussion_r1705442316
########## be/src/util/byte_buffer.h: ########## @@ -23,19 +23,21 @@ #include <memory> #include "common/logging.h" +#include "vec/common/allocator.h" +#include "vec/common/allocator_fwd.h" namespace doris { struct ByteBuffer; using ByteBufferPtr = std::shared_ptr<ByteBuffer>; -struct ByteBuffer { +struct ByteBuffer : private Allocator<false> { static ByteBufferPtr allocate(size_t size) { ByteBufferPtr ptr(new ByteBuffer(size)); return ptr; } - ~ByteBuffer() { delete[] ptr; } + ~ByteBuffer() { Allocator<false>::free(ptr, capacity); } Review Comment: warning: use '= default' to define a trivial destructor [modernize-use-equals-default] ```cpp ~ByteBuffer() { Allocator<false>::free(ptr, capacity); } ^ ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org