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

Start using g_autoptr and g_autofree in all GLib based code ? (libuca, etc) #8

Open
gabs1234 opened this issue Feb 16, 2023 · 0 comments
Labels
enhancement New feature or request prio:low Low priority issue question Further information is requested

Comments

@gabs1234
Copy link
Collaborator

These are some Glib macros that tell the compiler to automatically free any Heap variable before a return statement.
With this, you no longer need to call g_free() or g_object_unref().

Only caveat : You need to use GCC or CLANG (and also all your variables have to initialized before hand, but this is only natural). Maybe a deal breaker ?

Really not urgent, could simply make the codebase more modern, memory safe and readable.

@gabs1234 gabs1234 added enhancement New feature or request question Further information is requested prio:low Low priority issue labels Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio:low Low priority issue question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant