static void dispose(long pData,long pConfigInfo){
  OGLRenderQueue rq=OGLRenderQueue.getInstance();
  rq.lock();
  try {
    OGLContext.setScratchSurface(pConfigInfo);
    RenderBuffer buf=rq.getBuffer();
    rq.ensureCapacityAndAlignment(12,4);
    buf.putInt(DISPOSE_SURFACE);
    buf.putLong(pData);
    rq.flushNow();
  }
  finally {
    rq.unlock();
  }
}

static void dispose ( long pData , long pConfigInfo ) { OGLRenderQueue rq = OGLRenderQueue . getInstance ( ) ; rq . lock ( ) ; try { OGLContext . setScratchSurface ( pConfigInfo ) ; RenderBuffer buf = rq . getBuffer ( ) ; rq . ensureCapacityAndAlignment ( 12 , 4 ) ; buf . putInt ( DISPOSE_SURFACE ) ; buf . putLong ( pData ) ; rq . flushNow ( ) ; } finally { rq . unlock ( ) ; } }
disposes the native resources associated with the given oglsurfacedata ( referenced by the pdata parameter ) . this method is invoked from the native dispose ( ) method from the disposer thread when the java - level oglsurfacedata object is about to go away . note that we also pass a reference to the native glx / wglgraphicsconfiginfo ( pconfiginfo ) for the purposes of making a context current .
