No-SilverBullet commented on code in PR #2726:
URL: https://github.com/apache/dubbo-go/pull/2726#discussion_r1710809040
##########
protocol/invoker.go:
##########
@@ -88,11 +88,12 @@ func (bi *BaseInvoker) Invoke(context context.Context,
invocation Invocation) Re
return &RPCResult{}
}
-// Destroy changes available and destroyed flag
+// Destroy changes available and destroyed flag and release the url's
allocated memory
func (bi *BaseInvoker) Destroy() {
logger.Infof("Destroy invoker: %s", bi.GetURL())
bi.destroyed.Store(true)
bi.available.Store(false)
+ bi.url = nil
Review Comment:
As u can see in other changed files, in other places where`url` are used, I
changed the order, that is, destroyed them in the end to avoid null pointer
issues; But still requires careful review;
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]