Re: gnome 1.4 bonobo memory leak fixes



Hi Jeff,

On Sat, 2002-06-01 at 01:43, Jeffrey Stedfast wrote:
> The attached patch fixes memory leakage caused by using
> bonobo_exception_get_text() as if it returned a const char * by using
> another variable to hold the value until we are done with it and then
> free()'s it. Pretty simple.

	Looks fine; it would have been nicer to use:

	char *txt;
	printf ("Foo %s", (txt = bonobo_exception_get_text (ev)));
	g_free (txt);

	as the hope is that the debugging code doesn't totally destroy the
readability of the method by inserting hundreds of bogus lines into it;
but whatever. We probably need a bonobo_exception_printf () method or
something.

> I'll probably be submitting another (more serious) leak fix next week
> sometime. bonobo-ui-sync-menu.c seems to be leaking pixmap widgets and I
> have some ideas on how to fix it but don't feel like testing them
> tonight as it would mean messing around with libtool on a solaris box
> and I'm just not up for it tonight :-)

	Yes - I can imagine bonobo-ui-sync-menu does that; I think Morten
proposed a fix in bugzilla sometime back, but I'm somewhat concerned
about de-stabilizing things.

> Anyways, is it ok to commit this patch?

	Yes - please do.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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