free() question

From: Aaron Walker (ka0ttic_at_REMOVETHIScfl.rr.com)
Date: 12/26/03


Date: Fri, 26 Dec 2003 14:44:15 GMT

I apologize if this is a stupid question. I was just curious... is
there any reason why free() doesn't set the pointer (that was passed to
it) to NULL after giving the memory back to the heap? I decided to
write a wrapper for free() to do just that, and I wondered why free()
itself didn't do it.

Aaron

-- 
/usr/bin/fortune says:
How can you work when the system's so crowded?


Relevant Pages

  • Re: free() question
    ... > I apologize if this is a stupid question. ... > there any reason why freedoesn't set the pointer (that was passed to ... It's not a stupid question, but it *is* a FAQ ...
    (comp.lang.c)
  • Re: unions
    ... He's a little too stubborn and proud to apologize. ... reason Republican shills are friendly is that they *think* it's GOP TV.) ... don't we already have an American Empire by virtue ... not history. ...
    (rec.arts.sf.tv.babylon5.moderated)
  • Re: An Apology to ALL
    ... and apologize for this misunderstanding. ... knew his book would become famous; that's one reason he had to be pushed ... claim he wrote to gain attention, but never thought he would gain attention. ...
    (talk.origins)
  • Re: We choose to go to the moon
    ... /drive/ to the poorhouse. ... I apologize for wasting your time with my replies if ... That's another reason I'm not sure you meant to reply to me. ... suggestions as to what I need to understand about poverty. ...
    (sci.astro.amateur)
  • Re: We choose to go to the moon
    ... /drive/ to the poorhouse. ... I apologize for wasting your time with my replies if ... That's another reason I'm not sure you meant to reply to me. ... suggestions as to what I need to understand about poverty. ...
    (sci.astro.amateur)