Re: [evolution-patches] Use a static POA in ebook



On Tue, 2005-04-19 at 15:46 +0100, Ross Burton wrote:

> Whilst playing with libebook I noticed that the Bonobo POAs are being
> newly created for every EBookListener and EBookViewListener created.
> Originally I thought that Bonobo should be freeing these as they were
> leaking, but it turns out that this is a libebook bug: POAs should be
> long-lived.
> 
> This patch makes the POAs static in the _new methods, so they are only
> created once.  Michael Meeks says this will probably improve performance
> too, as multiple POAs is a bad thing.
> 
> If this gets commit approval I'll be good and make a changelog entry
> too, honest.

Could you wrap these in static mutexes so there's no way we'll leak in a
threaded environment?

-- 
Hans Petter Jansson | <hpj novell com>
Evolution Developer | http://hp.cl.no/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]