(There's an easy fix. Use strong references, and make ClassLoaderCache a member of ObjectGraph rather than a static constant.)