Skip to content

Release our buffer reference regardless of buffer_view success. - #20988

Merged
AWoloszyn merged 1 commit into
iree-org:mainfrom
AWoloszyn:release-buffer-view
Jun 3, 2025
Merged

AWoloszyn merged 1 commit into
iree-org:mainfrom
AWoloszyn:release-buffer-view

Conversation

@AWoloszyn

Copy link
Copy Markdown
Contributor

If we successfully created the buffer view, it holds a ref to the buffer, so we want to release our own. If we failed then we want to release the imported buffer anyway so we don't leak.

If we successfully created the buffer view, it holds a ref to the
buffer, so we want to release our own. If we failed
then we want to release the imported buffer anyway so
we don't leak.

Signed-off-by: Andrew Woloszyn <[email protected]>
@AWoloszyn
AWoloszyn merged commit dd6d6ce into iree-org:main Jun 3, 2025
Hardcode84 added a commit to iree-org/iree-turbine that referenced this pull request Jun 4, 2025
See iree-org/iree#20849 and
iree-org/iree#20988

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Ivan Butygin <[email protected]>
Co-authored-by: iree-pr-automator[bot] <[email protected]>
AWoloszyn added a commit that referenced this pull request Dec 1, 2025
If we successfully created the buffer view, it holds a ref to the
buffer, so we want to release our own. If we failed then we want to
release the imported buffer anyway so we don't leak.

Signed-off-by: Andrew Woloszyn <[email protected]>
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.

2 participants