Skip to content

Permit freeing underlying source / sink / transformer after close #932

@ricea

Description

@ricea

Once a stream is closed or errored, none of the methods on the underlying source / sink / transformer will be called any more. As a quality-of-implementation enhancement some browsers might decide to drop their references at that point so that the underlying object can be garbage collected even if the stream is still referenced.

This is currently a valid optimisation, however if someone adds weak refs to Javascript it will become observable.

I propose that we explicitly drop the references in the standard to ensure this optimisation is valid. Implementations still won't be required to drop the references because they're not required to perform GC at any particular time or on any particular object.

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