java
8 minJava class-loader retention: why an undeployed app can remain in memory
Trace plugin and application class loaders from long-lived roots before blaming metaspace.
Loading page...
java
8 minTrace plugin and application class loaders from long-lived roots before blaming metaspace.
Q&A
Q&AA live root still reaches an object, class, or thread state owned by the old loader.
Look for parent-owned registries, executor queues, thread locals, context class loaders, and callbacks. An unreachable cycle can be collected; a path from a long-lived root cannot.
Q&A
Q&ALoading, linking, and initialization are distinct phases managed by class loaders.
A class loader locates and defines bytecode; linking verifies it, prepares class storage, and resolves symbolic references as needed; initialization runs static initialization in the specified order. Parent delegation is common but custom loaders can change identity: classes with the same name loaded by different loaders are distinct runtime types. Class-loader leaks often arise when long-lived references retain an application loader after redeployment.