<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Make fontconfig cache relocatable"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=101889#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Make fontconfig cache relocatable"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=101889">bug 101889</a>
              from <span class="vcard"><a class="email" href="mailto:freedesktop@behdad.org" title="Behdad Esfahbod <freedesktop@behdad.org>"> <span class="fn">Behdad Esfahbod</span></a>
</span></b>
        <pre>(In reply to Akira TAGOH from <a href="show_bug.cgi?id=101889#c8">comment #8</a>)
<span class="quote">> No reference counts in the serialized FcPattern</span >

Right. But we do increase ref count of the cache itself when you try reffing
the FcPattern.

<span class="quote">> and can't figure out in it
> itself how long it is available, but FcCache. so when going to add something
> into the serialized FcPattern, it needs to be exposed to FcCache to manage
> the lifetime of the allocated memory. which is ugly. otherwise that may
> introduces the memory leaks or invalid access.</span >

Sure. One way or another you need to do this...  When freeing the cache, walk
and "free" the patterns which will free the strings.

Another option is to keep the path relative, and resolve it in
FcFontRenderPrepare.

Maybe you should write to the list with your proposed design so we can all
discuss before implementing such drastic changes?  Basically what you have
committed right now is taking fontconfig cache from consuming no private memory
to consuming megabytes of private memory per app...</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>