njReleaseTexture | Japanese
    <-|INDEX|->
Releases texture memory

### FORMAT

      #include <Ninja.h>
      Sint32 njReleaseTexture(*texlist);
      NJS_TEXLIST *texlist

### PARAMETERS

*texlist
  NJS_TEXLIST structure pointer

### RETURN VALUE

Successful
  1
Failed
  -1

### FUNCTION

- Releases texture memory of texlist

### EXAMPLE

      NJS_TEXNAME texname[2];

      NJS_TEXNAME texname2[2];

      NJS_TEXLIST texlist ={texname,2};
      NJS_TEXLIST texlist2 ={texname2,2};

      /* Prepare to read four textures */
      NJS_TEXMEMLIST texmemlist[4];

      njInitTexture(texmemlist,4);

      njSetTextureName(&texname[0],"file1.pvr",0,NJD_TEXATTR_TYPE_FILE|
                  NJD_TEXATTR_GLOBALINDEX);
      njSetTextureName(&texname[1],"file2.pvr",1,NJD_TEXATTR_TYPE_FILE|
                  NJD_TEXATTR_GLOBALINDEX);
      njSetTextureName(&texname2[0],"file1.pvr",0,NJD_TEXATTR_TYPE_FILE|
                  NJD_TEXATTR_GLOBALINDEX);
      njSetTextureName(&texname2[1],"file3.pvr",2,NJD_TEXATTR_TYPE_FILE|
                  NJD_TEXATTR_GLOBALINDEX);

      /* load texture */
      njLoadTexture(&texlist);
      njLoadTexture(&texlist2);

       /* Release the texture in texlist */
      njReleaseTexture(&texlist);

      /*
      	Even if texlist is released, since file1.pvr is in texlist2 also,
      	file.pvr will not be released from texture memory.
      	** However file1.pvr cannot be read with texlist unless it is loaded
      	again.
      */

### NOTES

- As noted above, if the texture is loaded in another texture list, the texture will not be released from texture memory unless all other occupying lists release the texture.
- Refer to Texture Guide for more details.

### RELATED TOPICS

njReleaseTexture |
    <-|INDEX|->