- Enclosing class:
- BasicJeriExporter
private static class BasicJeriExporter.ImplContainer
extends Object
Container for an impl object.
BasicJeriExporter, when exporting an impl, passes an impl container
to the package-private BasicObjectEndpoint constructor so that the
BasicObjectEndpoint can reference the impl strongly (through the
container) while the object is exported. The BasicJeriExporter
instance holds onto the impl container weakly so it won't prevent
the impl from being garbage collected; only the local stub that
references the BasicObjectEndpoint will prevent the impl from being
garbage collected.
If the object is explicitly unexported via BasicJeriExporter, the
BasicJeriExporter instance clears the impl field (if the container
hasn't been garbage collected) so a reachable stub that references
the container (via the BasicObjectEndpoint in the stub) will not
prevent the impl from being garbage collected.