Unregister RPC and ConnectCall methods
Created by: VoidingWarranties
Fixes issue #1156 (closed) brought up in #1154.
This PR adds two new methods to the gateway UnregisterRPC
and UnregisterConnectCall
.
Without these methods the gateway will maintain references to RPCFuncs passed into RegisterRPC and RegisterConnectCall forever. This prevented the GC from cleaning up modules that were closed separately from the gateway. These two methods should primarily be used in the Close()
method of modules.