qoa icon indicating copy to clipboard operation
qoa copied to clipboard

API does not provide a way to safely free qoa_decode return value

Open samhocevar opened this issue 10 months ago • 0 comments

The API does not provide a way to free the memory returned by qoa_decode(). I would use QOA_FREE() but this macro is only available when defining QOA_IMPLEMENTATION, which does not work when using C++ (see #34). Of course there are plenty of workarounds, but they all introduce some inconsistencies, so maybe a simple void qoa_free(void *p) { QOA_FREE(p); } in the API could help.

samhocevar avatar Mar 11 '25 16:03 samhocevar