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 - quartz window: explicit release or not?
Summary: quartz window: explicit release or not?
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 1.2
Hardware: PowerPC Mac OS X (All)
: P2 blocker
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-27 11:06 UTC by Ryan C. Gordon
Modified: 2006-05-07 18:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.