public class SunAwtAppContextInitiator extends Object implements PreClassLoaderInitiator
sun.awt.AppContext#contextClassLoader to the classloader of the calls
to sun.awt.AppContext#getAppContext(). Avoid leak by forcing initialization using system classloader.
Note that Google Web Toolkit (GWT) will trigger this leak via its use of javax.imageio.
See http://java.jiderhamn.se/2012/02/26/classloader-leaks-v-common-mistakes-and-known-offenders/| Constructor and Description |
|---|
SunAwtAppContextInitiator() |
| Modifier and Type | Method and Description |
|---|---|
void |
doOutsideClassLoader(ClassLoaderLeakPreventor preventor)
Perform action that needs to be done outside the leak susceptible classloader, i.e. in the system or other parent
classloader.
|
public void doOutsideClassLoader(ClassLoaderLeakPreventor preventor)
PreClassLoaderInitiatorThread.contextClassLoader of the current
thread when method is invoked.
Must NOT have modified Thread.contextClassLoader of the current thread when returning.doOutsideClassLoader in interface PreClassLoaderInitiatorCopyright © 2019. All rights reserved.