Skip to content

Fix BControl holder ownership - #21

Open
cyberman wants to merge 1 commit into
coolcoder613eb:mainfrom
Be-Quiet-Home:fix-bcontrol-holder-ownership
Open

Fix BControl holder ownership#21
cyberman wants to merge 1 commit into
coolcoder613eb:mainfrom
Be-Quiet-Home:fix-bcontrol-holder-ownership

Conversation

@cyberman

@cyberman cyberman commented Jul 28, 2026

Copy link
Copy Markdown

Problem

BControl uses pybind11's default owning holder even after the control has been added to a BWindow.

When the window destroys the attached control, releasing the remaining Python wrapper can attempt to delete it again and abort in Haiku's allocator.

Fix

Use a py::nodelete holder, matching the ownership model already used by BView.

Validation

Verified that a window-owned BControl can be destroyed and its Python wrapper released without an allocator abort.

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