Skip to content

Prevent class/classloader retention in GenericConversionService [SPR-13099] #17690

@spring-projects-issues

Description

@spring-projects-issues

Eric Bottard opened SPR-13099 and commented

Context: Spring XD creates disposable application contexts (modules) with their own classloader, from a main context which is loaded from the system classloader. That main context happens to have a GenericConversionService that is aware of types that are loaded from the modules classloaders.

This creates a leak that prevents the module classloaders to be GC'ed.

The path is as below:

mainContext -> stuff -> genericConversionService -> converterCache -> cacheKey -> (source|target)Type -> resolvableType -> resolved(Class) -> module ClassLoader

Note that there may be other paths that may be problematic in other situations


Affects: 4.2 RC1

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions