Mercurial > libavcodec.hg
comparison mem.c @ 3008:e23d2bddf122 libavcodec
av_freep() recommandition
author | michael |
---|---|
date | Wed, 04 Jan 2006 09:42:37 +0000 |
parents | bfabfdf9ce55 |
children | 0b546eab515d |
comparison
equal
deleted
inserted
replaced
3007:5d9d55e2a8c6 | 3008:e23d2bddf122 |
---|---|
115 #else | 115 #else |
116 return realloc(ptr, size); | 116 return realloc(ptr, size); |
117 #endif | 117 #endif |
118 } | 118 } |
119 | 119 |
120 /* NOTE: ptr = NULL is explicetly allowed */ | 120 /** |
121 * Free memory which has been allocated with av_malloc(z)() or av_realloc(). | |
122 * NOTE: ptr = NULL is explicetly allowed | |
123 * Note2: it is recommanded that you use av_freep() instead | |
124 */ | |
121 void av_free(void *ptr) | 125 void av_free(void *ptr) |
122 { | 126 { |
123 /* XXX: this test should not be needed on most libcs */ | 127 /* XXX: this test should not be needed on most libcs */ |
124 if (ptr) | 128 if (ptr) |
125 #ifdef MEMALIGN_HACK | 129 #ifdef MEMALIGN_HACK |