* @memberof ktxTexture @private * @~English * @brief Free the memory associated with the texture contents * * @param[in] This pointer to the ktxTextureInt whose texture contents are * to be freed. */
| 224 | * to be freed. |
| 225 | */ |
| 226 | void |
| 227 | ktxTexture_destruct(ktxTexture* This) |
| 228 | { |
| 229 | ktxStream stream = *(ktxTexture_getStream(This)); |
| 230 | |
| 231 | if (stream.data.file != NULL) |
| 232 | stream.destruct(&stream); |
| 233 | if (This->kvDataHead != NULL) |
| 234 | ktxHashList_Destruct(&This->kvDataHead); |
| 235 | if (This->kvData != NULL) |
| 236 | free(This->kvData); |
| 237 | if (This->pData != NULL) |
| 238 | free(This->pData); |
| 239 | free(This->_protected); |
| 240 | } |
| 241 | |
| 242 | |
| 243 | /** |
no test coverage detected