Skip to content

Sleeper leaks due to circular arcs #2232

Closed
@TheBlueMatt

Description

@TheBlueMatt

Sleeper registers a lambda which holds an arc to the future state the future is sitting in, which makes a circular reference to the FutureState arc, leaking memory. This leaks around 100 bytes. In the sync BP or the async BP with mobile_interruptable_platform set, this is called once per 100ms, at max, which leaks around a hundred-or-two MiB per day. For the async BP with mobile_interruptable_platform unset, its closer to half a MiB per day, which is borderline within noise for a machine with the network graph.

For a mobile this isn't a big deal - you're never running long enough to materially see the impacts of the leak, for a server platform in Rust you're probably moving to async with mobile_interruptable_platform unset, so also no big deal. Servers running sync code or in languages other than Rust may be materially impacted, so its worth fixing this for the bindings release of 115.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions