GLContext context = context(ctx);
if (GLContext.getCurrent() == context) {
context.release();
}
context.destroy();
// assuming this is the right point at which to make this call
joglDrawable.getGLDrawable().setRealized(false);
joglDrawable.destroyNativeWindow();