vy commented on code in PR #3199:
URL: https://github.com/apache/logging-log4j2/pull/3199#discussion_r1837099466


##########
log4j-api/src/main/java/org/apache/logging/log4j/spi/LoggerRegistry.java:
##########
@@ -43,7 +41,7 @@
 @NullMarked
 public class LoggerRegistry<T extends ExtendedLogger> {
 
-    private final Map<String, Map<MessageFactory, WeakReference<T>>> 
loggerRefByMessageFactoryByName = new HashMap<>();
+    private final Map<MessageFactory, Map<String, T>> 
loggerByNameByMessageFactory = new WeakHashMap<>();

Review Comment:
   Doesn't this change imply that a `Logger` will never be freed unless the 
associated `MF` becomes unreachable?



-- 
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]

Reply via email to