Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Refactoring - Use a generic object free #40

Open
ocourtin opened this issue Nov 14, 2012 · 2 comments
Open

Code Refactoring - Use a generic object free #40

ocourtin opened this issue Nov 14, 2012 · 2 comments
Assignees
Milestone

Comments

@ocourtin
Copy link

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.

@ghost ghost assigned ocourtin Nov 14, 2012
@tbonfort
Copy link
Member

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
Copy link
Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants