Re: Why there's still ONE element left after g_slist_free () ?



On Thu, 14 May 2009 20:27:18 +0000
american communist party gmail com wrote:

> You should quote the object of the comment ENTIRELY before commenting,  
> shouldn't you?

Nobody misquoted you, nor did they strip any of your comment out. And
nobody was objecting to your comment as a result of lack of context.

> The actual comment by PenT does state as much:
> "to assign NULL to it after g_slist_free ()..."
 
Yes, that's true, PenT did state the right thing.

> AFTER g_slist_free. I don't see that I was mutually exclusive in my reply.

Well how about this:
 
> On May 14, 2009 11:51am, Chris Moller <moller mollerware com> wrote:
> > american communist party gmail com wrote:
> 
> > > Its old hat to C programmers that you set any object to NULL
>>> when you're done with it,
> > > which returns the memory used to the heap.

Now note that the "when you're done with it" is merely a contextual
clause and can therefore be eliminated from the sentence without
significantly changing its meaning (simple English grammar 101).
Therefore what you wrote was a statement that setting "any object" to
NULL "returns the memory to the heap". This is explicitly wrong. Your
sentence should have read:

It's old hat to C programmers that you set any pointer to NULL when
you're done with it and have returned the memory used by the object it
referenced to the heap.

Though even that isn't strictly correct since the pointer may not
reference a heap object, so you should have written:

It's old hat to C programmers that you set any pointer to NULL when
you're done with it; especially if you have deleted the object it
referenced and returned the memory used to the heap.

Sorry for the English lesson, but there are enough people reading this
who don't _know_ what you must have meant that it really _does_ matter
when you actually _say_ something quite different.

HTH
Rob


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]