# HG changeset patch # User reimar # Date 1251839553 0 # Node ID 0aa36133f638ed467d570ffdc1adfcd645cd6f8e # Parent 2b14be337eaf7f097be8e6d3975bbc2a2217b0ee Add a dealloc function to corevideo to reduce the memleaks from (for my sample) about 12 MB to 2 MB. diff -r 2b14be337eaf -r 0aa36133f638 libvo/vo_corevideo.m --- a/libvo/vo_corevideo.m Tue Sep 01 20:09:01 2009 +0000 +++ b/libvo/vo_corevideo.m Tue Sep 01 21:12:33 2009 +0000 @@ -480,6 +480,17 @@ texture = NULL; } +- (void) dealloc +{ + [self releaseVideoSpecific]; + CVOpenGLTextureCacheRelease(textureCache); + textureCache = NULL; + [self setOpenGLContext:nil]; + [glContext release]; + glContext = NULL; + [super dealloc]; +} + - (void) config { uint32_t d_width;