To create instances of 'managed' objects Gradle us...
# community-support
a
To create instances of 'managed' objects Gradle uses ASM to generate subtypes, and additionally creates inner classes to instantiate new instances. The inner classes are marked as 'public' and 'synthetic'. E.g. in NamedObjectInstantiator and a couple of other places. My understanding is inner classes should always be static, where possible, to avoid memory leaks. Should
ACC_PUBLIC | ACC_SYNTHETIC
be replaced with
ACC_PUBLIC | ACC_SYNTHETIC | ACC_STATIC
?
👀 1
I saw the YourKit 'Objects retained by inner class back references' inspection reports a lot of these generated classes
v
If those inner classes do not access something of the enclosing class, I'd agree that static would probably be better.
a
v
Uuuh, would be nice if that indeed fixes the classloader isolation leak