remkop commented on a change in pull request #289: LOG4J2-2644 - Improve performance of getting location info URL: https://github.com/apache/logging-log4j2/pull/289#discussion_r299254217
########## File path: log4j-api-java9/src/main/java/org/apache/logging/log4j/util/StackLocator.java ########## @@ -31,6 +33,7 @@ private final static StackLocator INSTANCE = new StackLocator(); + private final static ThreadLocal<FqcnCallerLocator> LOCATOR = ThreadLocal.withInitial(FqcnCallerLocator::new); Review comment: Hi Carter, yes. Not sure which comment you were looking for, but in general ThreadLocals that hold a reference to an application class (e.g. a Log4j class) may cause memory leaks in application servers that keep their thread pools up when a web app is stopped and started. If the ThreadLocal only contains classes that are in the JDK library, such memory leaks will not occur. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services