GLDrawableHelper keeps a ThreadLocal variable:
private static final ThreadLocal<Runnable> perThreadInitAction = new ThreadLocal<Runnable>();
The init action in GLCanvas and GLJPanel are defined as anonymous classes (hence keeping a reference to the canvas or panel itself).
It looks like these init actions are kept in above ThreadLocal variable, even after disposing the GLCanvas or GLJPanel, leading to a memory leak as long as the ThreadLocal variable keeps the runnable.
Static ThreadLocal 'perThreadInitAction' leaks memory if using a hard reference,
utilizing a WeakReference allows the passed 'initAction' owner to be garbage collected.
It has to be noted, that the static ThreadLocal storage
within GLDrawableHelper originally did not get released
in case of AWT, since the GLDrawableHelper instance is
a member of GLCanvas/GLJPanel and used from within the
AWT-EDT, which does not die.