mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
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:
@ -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);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user