Describe the bug (描述bug)
When using butil::ObjectPoolAllocator to construct butil::MPSCQueue. The returned pointer will be accidentally saved in a object pool of void pointers.
To Reproduce (复现方法)
Construct butil::MPSCQueue with butil::ObjectPoolAllocator, and check memory consumption.
Expected behavior (期望行为)
No memory leak.
Versions (各种版本)
OS: ALL supported OS.
Compiler: ALL supported compiler.
brpc: bRPC version after MPSQ was introduced.
protobuf: ALL supported version.
Additional context/screenshots (更多上下文/截图)
Describe the bug (描述bug)
When using
butil::ObjectPoolAllocatorto constructbutil::MPSCQueue. The returned pointer will be accidentally saved in a object pool of void pointers.To Reproduce (复现方法)
Construct
butil::MPSCQueuewithbutil::ObjectPoolAllocator, and check memory consumption.Expected behavior (期望行为)
No memory leak.
Versions (各种版本)
OS: ALL supported OS.
Compiler: ALL supported compiler.
brpc: bRPC version after MPSQ was introduced.
protobuf: ALL supported version.
Additional context/screenshots (更多上下文/截图)