[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

Re: The reference counter handling in FcConfigGetCurrent() and FcConfigReference().



On Fri, 22 Jan 2010 06:57:39 +0900, mpsuzuki@xxxxxxxxxxxxxxxxx wrote:
> Hmm, if an application links multiple libraries that some
> of them call FcConfigGetCurrent() or FcInit() by themselves
> (so FcConfigGetCurrent() or FcInit() are called multiply),
> FcFini() should be called by the application to restrict
> only one freeing? Or, all libraries can call FcFini() by
> their own scope?

It would be a very bad design if any library attempted to finalize
another shared resource at a random point in time, for precisely the
reasons you have outlined.

Cleaning up of global state can only be performed by the application once
it has guaranteed that those resources are no longer in use - typically
during the shutdown of the last thread, primarily for the purposes of leak
checking.
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig

[Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Legacy]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux