KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
834 stars 222 forks source link

docs: clarify pointer lifetimes for ktxTexture_SetImageFromMemory #917

Closed matthew-rister closed 3 weeks ago

matthew-rister commented 1 month 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 1 month ago

CLA assistant check
All committers have signed the CLA.

MarkCallow commented 4 weeks 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.