Mercurial > libavcodec.hg
comparison utils.c @ 2840:22eec5a1b043 libavcodec
Call av_free_static automatically before DLL unload patch by (plaum:ipf uni-stuttgart de)
author | michael |
---|---|
date | Sun, 21 Aug 2005 19:50:22 +0000 |
parents | b128802eb77b |
children | 6f7428adc6ad |
comparison
equal
deleted
inserted
replaced
2839:b857807dfe30 | 2840:22eec5a1b043 |
---|---|
139 { | 139 { |
140 while(last_static){ | 140 while(last_static){ |
141 av_freep(&array_static[--last_static]); | 141 av_freep(&array_static[--last_static]); |
142 } | 142 } |
143 av_freep(&array_static); | 143 av_freep(&array_static); |
144 } | |
145 | |
146 /** | |
147 * Call av_free_static automatically before it's too late | |
148 */ | |
149 | |
150 static void do_free() __attribute__ ((destructor)); | |
151 | |
152 static void do_free() | |
153 { | |
154 av_free_static(); | |
144 } | 155 } |
145 | 156 |
146 /** | 157 /** |
147 * Frees memory and sets the pointer to NULL. | 158 * Frees memory and sets the pointer to NULL. |
148 * @param arg pointer to the pointer which should be freed | 159 * @param arg pointer to the pointer which should be freed |