add WebPFree() to the API

this should be used in preference to free() for releasing memory
returned from WebPDecode*() / WebPEncode*(). this simplifies memory
management when working through language bindings

Change-Id: I15eb538a45390efc552fda8e5c251a3fbdc13c29
This commit is contained in:
James Zern
2015-07-06 23:11:29 -07:00
parent 0ae2c2e4b2
commit 822f113ebb
4 changed files with 21 additions and 21 deletions

View File

@ -12,6 +12,7 @@
// Author: Skal (pascal.massimino@gmail.com)
#include <stdlib.h>
#include "../webp/decode.h"
#include "./utils.h"
// If PRINT_MEM_INFO is defined, extra info (like total memory used, number of
@ -208,4 +209,9 @@ void WebPSafeFree(void* const ptr) {
free(ptr);
}
// Public API function.
void WebPFree(void* ptr) {
free(ptr);
}
//------------------------------------------------------------------------------