We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 98

Summary: quartz window: explicit release or not?
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: blocker    
Priority: P2 CC: max
Version: HG 1.2   
Hardware: PowerPC   
OS: Mac OS X (All)   

Description Ryan C. Gordon 2006-01-27 11:06:53 UTC
http://www.libsdl.org/cgi/cvsweb.cgi/SDL12/src/video/quartz/SDL_QuartzVideo.m

Bob's patch in revision 1.41 disagrees with mine in revision 1.45...figure out which is actually right.

--ryan.
Comment 1 Ryan C. Gordon 2006-01-27 11:23:29 UTC
Setting Sam as "QA Contact" on all bugs (even resolved ones) so he'll definitely be in the loop to any further discussion here about SDL.

--ryan.

Comment 2 Max Horn 2006-03-22 13:29:46 UTC
All I can say is that I just verified that
  [qz_window isReleasedWhenClosed]
returns true (at the end of QZ_SetVideoWindowed, that is).
Comment 3 Sam Lantinga 2006-04-27 06:08:41 UTC
It definitely sounds like Bob's is right.  Can you verify?
Comment 4 Sam Lantinga 2006-05-07 17:08:43 UTC
Can someone confirm this for 1.2.10 release?
Comment 5 Ryan C. Gordon 2006-05-07 18:52:27 UTC
I added some debug printf()s ...

printf("pre close: %d\n", (int) [ qz_window retainCount ] );
        [ qz_window close ];
printf("post close: %d\n", (int) [ qz_window retainCount ] );
        [ qz_window release ];
printf("post release: %d\n", (int) [ qz_window retainCount ] );


This produces:

pre close: 1
post close: 1
objc: FREED(id): message retainCount sent to freed object=0x11371d0
Trace/BPT trap


The Apple docs say release-when-closed is ignored if the window has a controller...I guess we do in this case. So the explicit release, as it is in svn right now, is correct. No patch needed.

--ryan.