diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-01 21:12:33 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-01 21:12:33 +0000 |
commit | 9ad17fad92aa34edcfae05e03df4cce7b63fa1e8 (patch) | |
tree | 45cbf241fa004a8f71f5193e5a6974310ab31d6f /libvo/vo_corevideo.m | |
parent | cb9e32c88cff1467adad4adab0396db54f0d3d18 (diff) | |
download | mpv-9ad17fad92aa34edcfae05e03df4cce7b63fa1e8.tar.bz2 mpv-9ad17fad92aa34edcfae05e03df4cce7b63fa1e8.tar.xz |
Add a dealloc function to corevideo to reduce the memleaks from
(for my sample) about 12 MB to 2 MB.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29616 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_corevideo.m')
-rw-r--r-- | libvo/vo_corevideo.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libvo/vo_corevideo.m b/libvo/vo_corevideo.m index 811cb0c0d6..e299a09137 100644 --- a/libvo/vo_corevideo.m +++ b/libvo/vo_corevideo.m @@ -480,6 +480,17 @@ static int control(uint32_t request, void *data, ...) 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; |