Java tutorial
//package com.java2s; //License from project: Apache License import javax.microedition.khronos.opengles.GL10; public class Main { public final static int INVALID_TEXTURE_ID = -1; /** * Delete loaded texture. * * @param gl this method <b>must be</b> call in GL thread. * @param texID delete texture ID(the first element of array) */ public static void freeTexture(GL10 gl, int[] texID) { if (null == texID || texID.length <= 0) { return; } gl.glDeleteTextures(1, texID, 0); texID[0] = INVALID_TEXTURE_ID; } }