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

Function ktxTexture_destruct

lib/texture.c:226–240  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

224 * to be freed.
225 */
226void
227ktxTexture_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/**

Callers 4

ktxTexture2_destructFunction · 0.85
ktxTexture1_constructFunction · 0.85
ktxTexture1_destructFunction · 0.85

Calls 2

ktxHashList_DestructFunction · 0.85
destructMethod · 0.45

Tested by

no test coverage detected