BewareMyPower commented on a change in pull request #11762:
URL: https://github.com/apache/pulsar/pull/11762#discussion_r695353709



##########
File path: pulsar-client-cpp/lib/ClientImpl.cc
##########
@@ -129,7 +129,7 @@ ClientImpl::ClientImpl(const std::string& serviceUrl, const 
ClientConfiguration&
     }
 }
 
-ClientImpl::~ClientImpl() { shutdown(); }

Review comment:
       I think there's no need to call `shutdown()` in destructor. `shutdown()` 
is an exposed method that is responsible to release all resources and can be 
called by `close()`. User should explicitly call `close()` or `shutdown()` 
otherwise there will be a resource leak.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to