memory leak proof every C program
Memory leaks have plagued C programs for as long as the language has existed. Many solutions have been proposed, even going so far as to suggest we should rewrite C programs in other languages. But there’s a better way.Presented here is a simple solution that will eliminate the memory leaks from every C program. Link this into your program, and memory leaks are a thing of the past.leakproof.c#include <dlfcn.h>
#include <stdio.h>
struct leaksaver {
struct leaksaver *next;
void *pointer;
} *bigbuc...
Read more at flak.tedunangst.com