diff options
Diffstat (limited to 'src/video_out/macosx/video_window.m')
-rw-r--r-- | src/video_out/macosx/video_window.m | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/video_out/macosx/video_window.m b/src/video_out/macosx/video_window.m index b70d9c0ce..d4fc12786 100644 --- a/src/video_out/macosx/video_window.m +++ b/src/video_out/macosx/video_window.m @@ -89,6 +89,14 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; return self; } +- (void) dealloc +{ + [xineView release]; + + [super dealloc]; +} + + - (XineOpenGLView *) xineView { return xineView; } @@ -212,6 +220,39 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification"; return self; } +- (id) initWithCoder:(NSCoder *)coder +{ + [super initWithCoder:coder]; + + self = [self initWithFrame:[self frame]]; + return self; +} + +- (void) encodeWithCoder:(NSCoder *)coder +{ + [super encodeWithCoder:coder]; +} + + +- (void) dealloc { + if (texture_buffer) + free (texture_buffer); + + if (fullScreenContext) { + [NSOpenGLContext clearCurrentContext]; + [fullScreenContext clearDrawable]; + [fullScreenContext release]; + } + + if (currentContext) { + [NSOpenGLContext clearCurrentContext]; + [currentContext clearDrawable]; + [currentContext release]; + } + + [super dealloc]; +} + - (void) reshape { if (!initDone) return; |