// Note: Usually the surface shall be locked within [makeCurrent .. swap .. release] protected void releaseImpl() throws GLException { try { super.releaseImpl(); } finally { if (!isOptimizable() && drawable.isSurfaceLocked()) { drawable.unlockSurface(); } } }