Here is a snippet of our C++ code...

std::shared_ptr<grpc::ChannelCredentials> m_pChanCreds;
std::shared_ptr<grpc::ChannelCredentials> m_pCreds;
std::shared_ptr<grpc::CallCredentials> m_pCallCreds;
std::unique_ptr<Speech::Stub> m_pSpeechStub;
m_pChanCreds = grpc::SslCredentials(grpc::SslCredentialsOptions());
m_pCallCreds = grpc::ServiceAccountJWTAccessCredentials(key, 3600);
m_pCreds = grpc::CompositeChannelCredentials(m_pChanCreds, m_pCallCreds);

auto channel = grpc::CreateChannel(m_strResourceURI, m_pCreds);
m_pSpeechStub = Speech::NewStub(channel);
To clean up m_pCallCreds, m_pCreds, channel and m_pSpeechStub, is it 
sufficient to just set m_pSpeechStub to NULL? 

How long does it take for the channel to be terminated after the stub is 
set to NULL? Is there anything else we could/should do to terminate and 
tear down the channel? 

What about the credentials? Anything we need to do to destroy them?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/857db64b-0286-42f9-bc82-9ac7c7c935ff%40googlegroups.com.

Reply via email to