Open
Description
We might be able to allow finalization to recover leaked memory by:
- Generate proxies with a finalizer
- The finalizer should cause the connection to die (or an RPC marshaled object's resources to be recovered).
- If a proxy's backdoor interfaces are accessed such that another proxy or direct JsonRpc object access was obtained, shut off the self-destruct feature since we can no longer be confident that dropping the proxy indicates permanent loss of access to the JSON-RPC connection.
- To support proxies that raise events, JsonRpc should only retain a reference to it when there are actually handlers added to these events.
Note this is just a best-effort mitigation. The documentation should still emphasize the importance of disposing proxies.
Metadata
Metadata
Assignees
Labels
No labels