changeset 25078:3efbdaab822f

Let NSApp handle events when uninit to fix the delay dealloc bug of mpGLView.
author ulion
date Mon, 19 Nov 2007 12:01:30 +0000
parents 82884fde28eb
children 3dcf8e3e65d9
files libvo/vo_macosx.m
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_macosx.m	Mon Nov 19 09:05:23 2007 +0000
+++ b/libvo/vo_macosx.m	Mon Nov 19 12:01:30 2007 +0000
@@ -249,6 +249,9 @@
     {
         mpGLView = nil;
         [autoreleasepool release];
+        NSAutoreleasePool *finalPool = [[NSAutoreleasePool alloc] init];
+        [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:YES];
+        [finalPool release];
     }
 }