Skip to content

release resources in COSOutputStream#462

Open
valerybokov wants to merge 1 commit into
apache:trunkfrom
valerybokov:release-resources-in-COSOutputStream
Open

release resources in COSOutputStream#462
valerybokov wants to merge 1 commit into
apache:trunkfrom
valerybokov:release-resources-in-COSOutputStream

Conversation

@valerybokov
Copy link
Copy Markdown

No description provided.

@msahyoun
Copy link
Copy Markdown

msahyoun commented Jun 2, 2026

Since filters is passed in from outside, COSOutputStream doesn't own it — won't clear() here risk surprising the caller?

@THausherr
Copy link
Copy Markdown
Contributor

Yeah why not just set it to null.

@valerybokov
Copy link
Copy Markdown
Author

Since filters is passed in from outside, COSOutputStream doesn't own it — won't clear() here risk surprising the caller?

Yeah, my bad.

@valerybokov
Copy link
Copy Markdown
Author

Yeah why not just set it to null.

This is good idea, but it is final. Can we set it as not final?

@msahyoun
Copy link
Copy Markdown

msahyoun commented Jun 3, 2026

given how short-lived COSOutputStream is I don't see the benefit in removing final from filters just to ensure nulling filters. It will be GC'd anyway as soon as the COSOutputStream reference is no longer held

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants