[mythtv] [patch] Fix for memory-leak in mythgallery
Julian Scheel
julian at jusst.de
Tue Nov 16 11:53:07 UTC 2004
Attached is a patch, which fixes a memory-leak in mythgallery's
OpenGL-Slideshow.
In loadImage() it's checked if there's a old texture, which should be
deleted,
but it's only deleted every 2nd time because for the number of textures, to
be deleted a is used, which changes between 0 and 1 every run.
It should be 1 all the time, because t.tex points always to the a-th
texture
in m_texItem.
Cheers
-Julian
-------------- next part --------------
? gallery-memleak-fix
Index: mythgallery/glsingleview.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythgallery/mythgallery/glsingleview.cpp,v
retrieving revision 1.5
diff -u -d -r1.5 glsingleview.cpp
--- mythgallery/glsingleview.cpp 6 Feb 2004 22:16:23 -0000 1.5
+++ mythgallery/glsingleview.cpp 16 Nov 2004 11:45:14 -0000
@@ -520,7 +520,7 @@
QImage tex = convertToGLFormat(image);
if (t.tex) {
- glDeleteTextures(a, &t.tex);
+ glDeleteTextures(1, &t.tex);
}
/* create the texture */
More information about the mythtv-dev
mailing list