+ 3
Please, Explain... Why there is a memory leak in the following code?
int *ptr = (int*)malloc(sizeof(int)); ptr = NULL; free(ptr);
4 Respuestas
+ 4
Without the second line, there is no memory leak.
+ 1
it means we can not free a null pointer ?
+ 1
ok now i understand it, after you edited the answer... thanks for your help...
+ 1
😀😁😘😘