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


##########
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:
   set it nil to let the gc collect resource



-- 
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: notifications-unsubscr...@dubbo.apache.org

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


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

Reply via email to