Thanks for your advice. The story is that i should use a video processing open source program called "ffmpe". it is a command line program. I want to run ffmpeg for more than one thousand time by "system" command in C in windows platform.
the model of calling ffmpeg is like below. IndexFunction is a very complicated and memory consumptive function.
system("d:\\ffmpeg -i ..........);
Do you think it will work? Do you have any suggestion and advice? Would you let me know how can i free the memory used by ffmpeg after each run?