Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

voice - cleanup disposables #193199

Merged
merged 1 commit into from
Sep 15, 2023
Merged

voice - cleanup disposables #193199

merged 1 commit into from
Sep 15, 2023

Conversation

bpasero
Copy link
Member

@bpasero bpasero commented Sep 15, 2023

No description provided.

@bpasero bpasero enabled auto-merge (squash) September 15, 2023 11:46
@bpasero bpasero self-assigned this Sep 15, 2023
@VSCodeTriageBot VSCodeTriageBot added this to the September 2023 milestone Sep 15, 2023
Comment on lines +147 to 152
override dispose(): void {
super.dispose();

this.data = new Float32Array(0);
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: overriding dispose is a little dangerous as it's not enforced that super.dispose() is called. Can you do this instead in the ctor?

this._register(toDisposable(() => this.data = new Float32Array(0)));

@bpasero bpasero merged commit 9a9ef69 into main Sep 15, 2023
6 checks passed
@bpasero bpasero deleted the ben/aware-lemur branch September 15, 2023 12:05
@github-actions github-actions bot locked and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants