Re: free()
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Wed, 14 Feb 2007 12:22:43 -0500
Richard Heathfield wrote:
Chris Dollin said:.... snip ...
It might not only be goats that use trollguns, and anyway there may
be other circumstances where you need to destroy a trollgun other
than the one where you are destroying - sorry! deleting - a goat.
Yes - but the same argument applies: either I'm going to destroy
the place that pointed to the gun, so no point nulling it, or I'm
going to give it a new value, so no point nulling it.
No, there's another possibility - that the entity that had the gun no
longer has a gun (I dunno, perhaps the troll rips out the arm that was
holding it or something), and thus NULL is an appropriate value for
that pointer. For me, this is often the case, (not that I use trollguns
very often) - objects gain and lose other objects with careful abandon.
I thought the UK had some fairly strict gun control laws. You
can't just allow any old goat to roam about shooting random
trolls. Some have redeeming values.
--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
.
- References:
- free()
- From: dbansal
- Re: free()
- From: santosh
- Re: free()
- From: Racaille
- Re: free()
- From: santosh
- Re: free()
- From: Richard Bos
- Re: free()
- From: Ian Collins
- Re: free()
- From: Christopher Benson-Manica
- Re: free()
- From: Richard Heathfield
- Re: free()
- From: Beej
- Re: free()
- From: Chris Dollin
- Re: free()
- From: Richard Heathfield
- Re: free()
- From: Chris Dollin
- Re: free()
- From: Richard Heathfield
- Re: free()
- From: Chris Dollin
- Re: free()
- From: Richard Heathfield
- free()
- Prev by Date: Re: Array size in run time
- Next by Date: Re: how to measure size of an array
- Previous by thread: Re: free()
- Next by thread: Re: free()
- Index(es):
Relevant Pages
|