Are there any tools out there that would be good to help me track memory allocation and use in my C program? I'd like to see when and where memory gets assigned and when it gets cleaned up.
Also, is it recommended practice to set the value of a pointer to NULL after the space to which it has been pointing has been freed using free()?
Example:
Code:int *p = malloc(sizeof(int)); free(p); p = NULL;