[poppler] memory still reachable when calling Page::display()

Vincent Torri vtorri at univ-evry.fr
Sun Mar 29 01:51:50 PDT 2009


Hey,

With the following code:

   output_dev = new SplashOutputDev(splashModeXBGR8, 4, gFalse, white);

[snip]

   page->page->display (output_dev,
                        72.0 * hscale,
                        72.0 * vscale,
                        rotate,
                        false, false, false,
                        doc->pdfdoc->getCatalog ());
   color_ptr = output_dev->getBitmap ()->getDataPtr ();

[snip]

   delete output_dev;


valgrind reports those still reachable memories:

==25494== 3,376 bytes in 1 blocks are still reachable in loss record 50 of 55
==25494==    at 0x4C232CB: malloc (vg_replace_malloc.c:207)
==25494==    by 0x5440CAA: _cmsCreateProfilePlaceholder (in /usr/lib/liblcms.so.1.0.16)
==25494==    by 0x545708D: cmsCreateRGBProfile (in /usr/lib/liblcms.so.1.0.16)
==25494==    by 0x5457408: cmsCreate_sRGBProfile (in /usr/lib/liblcms.so.1.0.16)
==25494==    by 0x511A306: GfxColorSpace::setupColorProfiles() (GfxState.cc:305)
==25494==    by 0x50F9BFA: Gfx::Gfx(XRef*, OutputDev*, int, Dict*, Catalog*, double, double, PDFRectangle*, PDFRectangle*, int, int (*)(void*), void*) (Gfx.cc:507)
==25494==    by 0x514090F: Page::createGfx(OutputDev*, double, double, int, int, int, int, int, int, int, int, Catalog*, int (*)(void*), void*, int (*)(Annot*, void*), void*) (Page.cc:408)
==25494==    by 0x5141124: Page::displaySlice(OutputDev*, double, double, int, int, int, int, int, int, int, int, Catalog*, int (*)(void*), void*, int (*)(Annot*, void*), void*) (Page.cc:437)
==25494==    by 0x51412FC: Page::display(OutputDev*, double, double, int, int, int, int, Catalog*, int (*)(void*), void*, int (*)(Annot*, void*), void*) (Page.cc:371)
==25494==    by 0x4E311D6: epdf_page_render (epdf_page.cpp:114)


It seems that cmsCloseProfile() is not called on RGBProfile. I don't 
really know where to call it, though

regards

Vincent Torri


More information about the poppler mailing list