* @memberof ktxTexture2 @private * @~English * @brief Destruct a ktxTexture2, freeing and internal memory. * * @param[in] This pointer to a ktxTexture2-sized block of memory to * initialize. */
| 1235 | * initialize. |
| 1236 | */ |
| 1237 | void |
| 1238 | ktxTexture2_destruct(ktxTexture2* This) |
| 1239 | { |
| 1240 | if (This->pDfd) free(This->pDfd); |
| 1241 | if (This->_private) { |
| 1242 | ktx_uint8_t* sgd = This->_private->_supercompressionGlobalData; |
| 1243 | if (sgd) free(sgd); |
| 1244 | free(This->_private); |
| 1245 | } |
| 1246 | ktxTexture_destruct(ktxTexture(This)); |
| 1247 | } |
| 1248 | |
| 1249 | /* |
| 1250 | * In hindsight this function should have been `#if KTX_FEATURE_WRITE`. |