Open ocourtin opened 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
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...
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.