From: Fabian Maurer Subject: Re: [=PATCH v5 2/2] gdiplus: In GdipPrivateAddMemoryFont allow loading fonts with long names Message-Id: <1871931.Jjyd520KEG@arch> Date: Mon, 20 Nov 2017 20:11:33 +0100 In-Reply-To: <17cea83c-384c-e51d-da8f-8605c6fa1e31@gmail.com> References: <20171119194426.9003-1-dark.shadow4@web.de> <17cea83c-384c-e51d-da8f-8605c6fa1e31@gmail.com> On Montag, 20. November 2017 18:38:14 CET Nikolay Sivov wrote: > On 20.11.2017 20:36, Vincent Povirk wrote: > >> v5 > >> Don't cleanup family, since GdipDeletePrivateFontCollection already seems > >> to do that> > > It'd be nice to follow up on this. Currently, our > > GdipGetFontCollectionFamilyList clones all the families, which would > > be leaking them. We can't check whether they're being freed, but we > > can check whether calling the function multiple times gives us the > > same pointer. > > I actually have a patch for that, for system collection it returns new > pointer second time you call it. Is it different for private collections, like in this case? Because if the family is freed in the patch I send, then calling GdipDeletePrivateFontCollection crashes. Regards, Fabian Maurer

On Montag, 20. November 2017 18:38:14 CET Nikolay Sivov wrote:

> On 20.11.2017 20:36, Vincent Povirk wrote:

> >> v5

> >> Don't cleanup family, since GdipDeletePrivateFontCollection already seems

> >> to do that>

> > It'd be nice to follow up on this. Currently, our

> > GdipGetFontCollectionFamilyList clones all the families, which would

> > be leaking them. We can't check whether they're being freed, but we

> > can check whether calling the function multiple times gives us the

> > same pointer.

>

> I actually have a patch for that, for system collection it returns new

> pointer second time you call it.

 

Is it different for private collections, like in this case? Because if the family is freed in the patch I send, then calling GdipDeletePrivateFontCollection crashes.

 

Regards,

Fabian Maurer