MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / ktxTexture2_destruct

Function ktxTexture2_destruct

lib/texture2.c:1237–1247  ·  view source on GitHub ↗

* @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. */

Source from the content-addressed store, hash-verified

1235 * initialize.
1236 */
1237void
1238ktxTexture2_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`.

Callers 4

ktxTexture2_constructFunction · 0.85
ktxTexture2_DestroyFunction · 0.85
runTestMethod · 0.85

Calls 1

ktxTexture_destructFunction · 0.85

Tested by 1

runTestMethod · 0.68