=====av_freep=====
====Overview====
Defined in ''mem.h''\\
Frees a memory block which has been allocated with [[ffmpeg:av_malloc]] or [[ffmpeg:av_realloc]] and set the pointer pointing to it to NULL.
void av_freep(void *ptr);
====Parameters====
===ptr===
void *ptr
Pointer to the pointer to the memory block which should be freed.\\
NOTE: ptr should be declared as a void**, eg. it should be used as in the following example:
void *p = av_malloc(42);
av_freep(&p);
// Now the memory is freed, and p has the value NULL.
Using av_freep is equivalent to using [[ffmpeg:av_free]] and manually setting the pointer to NULL afterwards.
====Return value====
NONE
====See also====
[[ffmpeg:av_free()]], [[ffmpeg:av_malloc()]], [[ffmpeg:av_realloc()]]
----
Back to [[ffmpeg:ffmpeg]]