@Override
	public RemoteRepositoryHandle getRepository(String name) throws IOException {

		System.gc();

		Repository repository = mgr.getRepository(currentUser, name);
		if (repository == null) {
			return null;
		}
		return new RepositoryHandleImpl(currentUser, repository);
	}
RMI callback when instance becomes unreferenced by any remote client
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/RepositoryServerHandleImpl.java