Skip to content

Minor memory leak in Pushes that have not timed out/cancelled timeout when Channel closes #142

Description

@jatindervrify

When performing a Push and then closing a channel, the timeout work item never releases the Push due to the strong retaining of self on Line 240 of Push.swift

/// Setup and start the Timeout timer.
let workItem = DispatchWorkItem { in
    self.trigger("timeout", payload: [:])
}

changing this closure to use [weak self] resolves the issue

/// Setup and start the Timeout timer.
let workItem = DispatchWorkItem { [weak self] in
    self?.trigger("timeout", payload: [:])
}

Screenshots:

image

image

Happy to investigate further if I'm in the wrong here. Cheers

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions