我已经为某些数据类型分配了内存并分配了一些值。现在使用free
内存中的数据是否被删除?free
如果分配的数据没有被删除,使用有什么用?谁能帮我吗?前任:
int *arr;
arr=(int*)malloc(sizeof(int)*1000);
assert(arr!=NULL);
/*Some operation*/
arr[123]=354;
//some operations
printf("%d",*(arr+123));
//calling some funcs
free(arr);
printf("\n%d",*(arr+123));