Re:Tips and Tricks to avoid memory leaks in writing C
by JoachimSchipper on Wednesday June 15, 2011 @07:22AM
(#2656628)
"Exceptions" can be useful: lots of my code looks like
[ Parent
| on HN ]
Re:Tips and Tricks to avoid memory leaks in writing C
by naughtysriram on Wednesday June 15, 2011 @09:10AM
(#2656902)
Nice idea, but people would scream seeing those goto's.
I used to do those in a macro/function like,
#define memalloc(x,y) { x=0;if(x=malloc(y)){}else{printf("error:no mem");} }