KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
886 stars 232 forks source link

docs: clarify pointer lifetimes for ktxTexture_SetImageFromMemory #917

Closed matthew-rister closed 5 months ago

matthew-rister commented 5 months ago

Problem ktxTexture1_SetImageFromMemory and ktxTexture2_SetImageFromMemory accept a pointer to image memory but do not clearly document if ownership of those pointers is transferred or copied.

Solution This commit adds a Doxygen note informing users that the underlying image data is copied and that they are responsible for freeing the original copy of image memory.

Testing Documentation updates were manually verified by building the project using the KTX_FEATURE_DOC=ON CMake option and viewing the generated Doxygen output using a local server.

Closes #914

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

MarkCallow commented 5 months ago

Sorry for my delay reviewing this. Work was hampered for more than a week by an error in the GitHub Actions Windows runner image.