Skip to content

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

@gabs1234

Description

@gabs1234

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestprio:lowLow priority issuequestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions