chaokunyang commented on code in PR #3514:
URL: https://github.com/apache/fory/pull/3514#discussion_r3021963500


##########
java/fory-core/src/main/java/org/apache/fory/builder/CodecUtils.java:
##########
@@ -40,6 +40,12 @@ public class CodecUtils {
   // Cache key includes configHash to distinguish between xlang and non-xlang 
modes
   private static final ConcurrentHashMap<Tuple3<String, Class<?>, Integer>, 
Class>
       graalvmSerializers = new ConcurrentHashMap<>();
+  // Generated layer serializers need the original layer metadata to bootstrap 
their delegate
+  // synchronously in the constructor.
+  // This is a process-lifetime cache keyed by generated serializer class, 
which mirrors the
+  // existing codegen cache behavior and is populated only on the regular JVM 
path.
+  private static final ConcurrentHashMap<Class<?>, MetaSharedLayerCodecContext>

Review Comment:
   This will make class unable to gc. In some hotload with classloader, the 
class leak may happen.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to