Skip to content

Equivalent to Python atexit functionality #11695

Closed
@bmurphy1976

Description

@bmurphy1976

I can't always guarantee that users are going to properly use a library (calling init methods, cleanup methods, etc.).

Occasionally things die horribly and you want to provide stronger guarantees about when things fail.

Is there a way to hook up to an exit signal of sorts to execute code when a program exits regardless of the exit mechanism? Something like Python atexit?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions