w-gc commented on code in PR #2872:
URL: https://github.com/apache/brpc/pull/2872#discussion_r1914525612


##########
src/brpc/server.cpp:
##########
@@ -151,7 +151,7 @@ ServerOptions::ServerOptions()
     , rtmp_service(NULL)
     , redis_service(NULL)
     , bthread_tag(BTHREAD_TAG_DEFAULT)
-    , rpc_pb_message_factory(new DefaultRpcPBMessageFactory())
+    , rpc_pb_message_factory(NULL)

Review Comment:
   
是的。但是,如果要比较彻底修复,可能需要梳理下ServerOptions里每个变量的生命周期,将ServerOptions写成RAII风格,自己写ServerOptions的拷贝、移动构造/操作。



-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to