|
ValueTypeCodec.STATIC_CODECS is a cache of codecs which are not bound to a particular schema, but rather to a particular Class – i.e. they get everything they need from that class.
While the cache has weak keys, it does not use weak values – which would be fine, except it is populated by a number of ReflectionBasedCodecs, each of which retain a reference to the class – which ends up being problematic, as the strong value prevents garbage collection of the codec, which in turn prevents the class from getting unreachable.
|