[poppler] poppler/qt: test-poppler-qt.cpp,1.6,1.7

Albert Astals Cid aacid at freedesktop.org
Wed Jul 27 07:52:12 EST 2005


Update of /cvs/poppler/poppler/qt
In directory gabe:/tmp/cvs-serv27132/qt

Modified Files:
	test-poppler-qt.cpp 
Log Message:
Fix mem leak in qt test app


Index: test-poppler-qt.cpp
===================================================================
RCS file: /cvs/poppler/poppler/qt/test-poppler-qt.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- test-poppler-qt.cpp	22 Jul 2005 10:45:19 -0000	1.6
+++ test-poppler-qt.cpp	26 Jul 2005 21:52:09 -0000	1.7
@@ -28,6 +28,7 @@
 PDFDisplay::PDFDisplay( Poppler::Document *d )
 {
   doc = d;
+  pixmap = 0;
   currentPage = 0;
   display();
 }
@@ -70,6 +71,7 @@
   if (doc) {
     Poppler::Page *page = doc->getPage(currentPage);
     if (page) {
+      delete pixmap;
       page->renderToPixmap(&pixmap, -1, -1, -1, -1);
       delete page;
       update();



More information about the poppler mailing list