binbin0325 commented on code in PR #2726:
URL: https://github.com/apache/dubbo-go/pull/2726#discussion_r1710800869


##########
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:
   If set nil, is there any risk of a null pointer elsewhere



-- 
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]

Reply via email to