See the initialization of ConcurrentReferenceHashMap with ReferenceType.SOFT for keys and values.
The inner cache may be GC'ed, thus also the contained Class. - no mem leak.