[Mapserver-dev] [PATCH] mapraster.c - fixing memory leaks
Daniel Morissette
dmorissette at dmsolutions.ca
Wed Jun 16 10:55:45 EDT 2004
Steve Lime wrote:
> Patch aside, what do folks think about using goto's? They seem a great
> help with things like clean-up. However there's not one in the code
> presently so I was wondering if there's a bias...
>
I've always avoided them because I was told way back when by some profs
that they were evil, but I guess if they're properly used they could
help keep the code cleaner sometimes.
If we use them then I think it should only be when absolutely necessary.
It is generally possible to structure a function so that you can
properly cleanup without the use of gotos and without increasing complexity.
My 0.02$
Daniel
--
------------------------------------------------------------
Daniel Morissette dmorissette at dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
More information about the mapserver-dev
mailing list