[poppler] fontconfig not shut down

Albert Astals Cid aacid at kde.org
Sun Mar 29 12:02:16 PDT 2009


A Diumenge, 29 de març de 2009, Vincent Torri va escriure:
> On Sun, 29 Mar 2009, Albert Astals Cid wrote:
> > A Diumenge, 29 de març de 2009, Vincent Torri va escriure:
> >> Hey,
> >>
> >> in the destructor of a globalParams, fontconfig is not shut dows while
> >> it is initialized in the constructor.
> >
> > The problem with this patch is that FcInit is ok if you already had
> > called it somewhere else (Qt, Pango, etc) but FcFini is bad because it'll
> > finish fontconfig and you won't be able to use it again after deleting
> > GlobalParams.
> >
> > I see there's a potential problem here but this is not the solution,
> > maybe the solution would be not calling FcInit at all and asking the
> > poppler user to pass it along but i doubt Qt let's you access its
> > internal FontConfig member.
>
> I've just look at the code and indeed FcFini() does not take into accout
> that problem (that's quite annoying... and stupid, imho)
>
> > All in all i don't think this is a BIG problem since you're supposed to
> > only have a GlobalParams for all the lifetime of your program.
>
> indeed, but i like closing my app with releasing all the memory cleanly.

Same here, if you REALLY want this fixed you can go to Fontconfig people and 
ask them to redesign their api or at least make FcInit/FcFini work over a 
counter so only the last FcFini makes the destruction take effect.

Albert

>
> ok, let's leave with it.
>
> Vincent Torri




More information about the poppler mailing list