Skip to content

Deal with IDisposable message handlers that are per-instance #15

Description

@tcabanski

Per-instance message handlers could also implement IDisposable. If they do, they have to be "released" when we are done with them. This is not the same as calling dispose directly (at least for most containers). Most IoC containers have some concept of Release. For example, Castle Windsor has an explicit release method. Some IoC container have the concept of a sub-container that calls IDispose for its components when it goes out of scope. This does have to be handled because, for at least Castle Windsor, this can cause memory leaks because in some cases the IoC container will hold onto the reference until the component is released or until the container itself is disposed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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