Skip to content

Consider not returning event handles from methods #3

@sharwell

Description

@sharwell

If event handles are returned from methods, it's easy to forget to dispose of them in cases where the event isn't required. Consider returning them via out parameters instead, so they are not allocated unless they are actually going to be used.

Another alternative is creating two methods for each of the current ones, one which returns void and another which performs the same operation but returns an event handle.

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