Permalink
Browse files

nglWindow UIKit bug fix work in progress

  • Loading branch information...
1 parent d67220e commit 3cb484df197ca7215aee4b8fe5c473fbb8cbe0f0 @neywen committed Jul 28, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/Window/UIKit/nglWindow_UIKit.mm
@@ -171,6 +171,7 @@ - (void) dealloc
{
[glView removeFromSuperview];
[glView release];
+ glView = nil;
}
[self disconnect];
[super dealloc];
@@ -1051,9 +1052,14 @@ - (void) EndSession
{
if (mpUIWindow)
{
+ int c1 = [[UIApplication sharedApplication].windows count];
[mpUIWindow disconnect];
[mpUIWindow removeFromSuperview];
- [mpUIWindow release];
+ [mpUIWindow resignKeyWindow];
+ [mpUIWindow autorelease];
+ int c2 = [[UIApplication sharedApplication].windows count];
+ id array = [UIApplication sharedApplication].windows;
+ printf("Windows count %d -> %d\n", c1, c2);
}
Unregister();
}

0 comments on commit 3cb484d

Please sign in to comment.