Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

should we change free/finalize functions to take double pointers? #15

@alistairking

Description

@alistairking

this would make the interface a little more robust in that the caller would give up their reference to the object being free'd.

for example, if i have a pointer, ptr, to corsaro_t and i call corsaro_finalize_output(ptr), the pointer is no longer valid, but i still have it pointing to some invalid memory.

instead, if we made the declaration corsaro_finalize_output(corsaro_t **corsaro), the caller would call the function as: corsaro_finalize_output(&ptr), and when it returned, ptr would point to NULL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions