This is an automated email from the ASF dual-hosted git repository.
wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 633039ce Fix memory leak of ArenaRpcPBMessageFactory (#2798)
633039ce is described below
commit 633039ce270211f1cc8db08cca71f07fff9ef47f
Author: Bright Chen <[email protected]>
AuthorDate: Tue Oct 29 11:29:47 2024 +0800
Fix memory leak of ArenaRpcPBMessageFactory (#2798)
---
src/brpc/rpc_pb_message_factory.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/brpc/rpc_pb_message_factory.h
b/src/brpc/rpc_pb_message_factory.h
index 52787be1..e65c8f14 100644
--- a/src/brpc/rpc_pb_message_factory.h
+++ b/src/brpc/rpc_pb_message_factory.h
@@ -113,6 +113,7 @@ public:
auto arena_messages = static_cast<ArenaRpcPBMessages*>(messages);
arena_messages->request = NULL;
arena_messages->response = NULL;
+ arena_messages->arena.Reset();
butil::return_object(arena_messages);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]