Repository navigation
Name what still holds a listed AppKit window - #30
Merged
Merged
Conversation
The settle loop ran its full half second and the count stayed at one, so the window is not merely waiting on AppKit's bookkeeping; something is holding it. Rather than guess a third time, the observer now names every window still listed, with its title, content view class, visibility, releasedWhenClosed flag and retain count. That distinguishes the toolkit keeping a closed window alive from an owner that never let go, and the fixture is compiled without ARC so the count is readable. Context::clear() also loses a condition I added without evidence. It required pthread_main_np() as well as a matching owning thread before disposing, where the other providers dispose on a matching owner alone. A context can only be used on the main thread, so a matching owner is already the main thread and the extra test could only defer a disposal the others perform at once -- which is exactly the shape of this failure. If that was the cause this fixes it, and if not the diagnostics say what is. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The settle loop ran its full half second and the count stayed at one, so the window is not merely waiting on AppKit's bookkeeping; something is holding it. Rather than guess a third time, the observer now names every window still listed, with its title, content view class, visibility, releasedWhenClosed flag and retain count. That distinguishes the toolkit keeping a closed window alive from an owner that never let go, and the fixture is compiled without ARC so the count is readable.
Context::clear() also loses a condition I added without evidence. It required pthread_main_np() as well as a matching owning thread before disposing, where the other providers dispose on a matching owner alone. A context can only be used on the main thread, so a matching owner is already the main thread and the extra test could only defer a disposal the others perform at once -- which is exactly the shape of this failure. If that was the cause this fixes it, and if not the diagnostics say what is.