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
?