On Tue, Feb 26, 2013 at 07:05:05AM +0000, John-Mark Bell wrote:
> On Mon, 2013-02-25 at 20:10 +0000, Chris Young wrote:
> > I must be msising something, but libwapcaplet allocates a "bucket" in
> > lwc__initialise(). As far as I can tell, this is never freed - as
> > there is no lwc__finalise or equivalent function?
>
> Correct -- this is expected. There's no safe way to do this without
> adding a context to the lwc API. That introduces a significant amount of
> pain in clients (as they have to pass the context around internally,
> which is problematic when you have multiple things using it. Thus, the
> root hash bucket is leaked, instead.
>
> I guess we could free the bucket when there are no strings left in it,
> however. Daniel: any thoughts?
It seems a tad silly to add a check to *every* unref to decide if we can free
the root bucket. Esp. given that with all the libs in use, that root bucket
will only ever empty fully immediately before exit.
Perhaps in debug builds?
D.
--
Daniel Silverstone http://www.netsurf-browser.org/
PGP mail accepted and encouraged. Key Id: 3CCE BABE 206C 3B69
No comments:
Post a Comment