列表 6. 未释放的内存 (unfree.c)

#include <stdio.h>
int main(void)
{
   char *ptr;
   ptr = (char *) calloc(5,sizeof(char) * 10);
   /* I forgot to release the memory */
   return(0);
}
© . All rights reserved.