Skip to content

mesa: don't leak lanes#899

Merged
pkova merged 1 commit intodevelopfrom
dozreg/mesa-leak
Oct 27, 2025
Merged

mesa: don't leak lanes#899
pkova merged 1 commit intodevelopfrom
dozreg/mesa-leak

Conversation

@dozreg-toplud
Copy link
Copy Markdown
Contributor

Resolves #

@dozreg-toplud dozreg-toplud requested a review from a team as a code owner October 27, 2025 16:35
@dozreg-toplud dozreg-toplud requested a review from pkova October 27, 2025 17:33
@pkova pkova merged commit ab05a88 into develop Oct 27, 2025
2 checks passed
@pkova pkova deleted the dozreg/mesa-leak branch October 27, 2025 17:43
@joemfb
Copy link
Copy Markdown
Collaborator

joemfb commented Oct 28, 2025

The prior code was certainly very silly, but this change should be a no-op wrt refounting. u3do() transfers the sample, so gaining while calling it should be no different from just dereferencing the tail. After the line in question, both las and dat should still be live.

@dozreg-toplud
Copy link
Copy Markdown
Contributor Author

the difference is that in prior code the reference to the tail is counted and subsequently leaked, and now it is an uncounted reference

@dozreg-toplud
Copy link
Copy Markdown
Contributor Author

so now u3z(dat) also frees las, and previously it didnt, there was an observable leak

@joemfb
Copy link
Copy Markdown
Collaborator

joemfb commented Oct 28, 2025

Right, thanks. I was focused on dat and didn't notice that the old behavior was effectively las = u3k(u3t(dat));.

pkova added a commit that referenced this pull request Oct 29, 2025
Another thing that I noticed in the debugging session which lead to
#899: `_term_io_quiz` should probably transfer?
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