@Override
    public void simpleUpdate(float tpf) {
        if (time < 0) {
            if (deletedTex != null) {
                deletedTex.getImage().resetObject();
            }
            return;
        }
        
        time += tpf;
        if (time > 5) {
            System.out.println("Assigning texture to deleted object!");
            
            deletedTex = assetManager.loadTexture("Interface/Logo/Monkey.png");
            BufferUtils.destroyDirectBuffer(deletedTex.getImage().getData(0));
            mat.setTexture("ColorMap", deletedTex);
            
            time = -1;
        }
    }
Demonstrate what happens if you use a deleted texture with OpenGL.

If assertions are enabled, an AssertionError is thrown NativeObjectManager.

@author Kirill Vainer
jme3-examples/src/main/java/jme3test/app/TestUseAfterFree.java