MapServer / tinyows

Source code of the TinyOWS project. Please submit pull requests to the 'main' branch.
https://mapserver.org/tinyows/
MIT License
59 stars 29 forks source link

Code Refactoring - Use a generic object free #40

Open ocourtin opened 11 years ago

ocourtin commented 11 years ago

On error code exit (mostly), i have to free every allocated objects. This could be a bit painfull/laborious to enumerate every object line by line.

A generic function dealing with an arbitrary number of args and in charge to free them all, could simplify the whole code.

tbonfort commented 11 years ago

You might want to look at apr pools: http://apr.apache.org/docs/apr/1.4/group__apr__pools.html . brings in a dependency, but simplifies dynamic memory usage

ocourtin commented 11 years ago

Thanks for this tip Thomas ! Will have to look at it...

For now i don't feel the need to add a dependancy only for memory usage, but maybe this app could also provide several other features... dunno...