View Single Post
TechCake
5Mar2008,17:36  
asadullah.ansari's Avatar
to check memory leak, you can use my program as
Code:
#include<malloc.h>
#include "findLeak.h"


int* fun();
int main()
{
  int *p2 = fun();
  free(p2);
  WriteMemLeak();
  return 0;
 }

int* fun()
{
  int *p1 = (int *)malloc(10);
  return p1;

}

Last edited by shabbir; 6Mar2008 at 13:23.. Reason: Code block