On Tue, 29 May 2007 16:13:52 -0400 Dennis Schridde 
<[EMAIL PROTECTED]> wrote:
>> Why that very bad programming style?  Once you free pointer, how
>> else you know it free if no set to NULL?
>I usualy know that a pointer is invalid by setting it to NULL.
Yes, so FREE(temp) is really free(temp) temp=NULL;
If you leave free(temp) without setting to NULL, then program never 
knows it was free before.
I still no see why this bad programming style?


>
>> The malloc memory being 
>> zero out is also standard from projects I have seen.
>Code that depends on variables to be initialized should do that 
>itself.
OK, this was just a nicer way I thinks, since use of memset is 
faster than doing lots of assignment to 0 operations.

--
Free information - Learn about Hardwood Floors. Click now!
http://tagline.hushmail.com/fc/CAaCXv1SLotIRlrZC1vYd1AeEh7QznMz/



_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to