Re: bonobo-activation; freeing base services ...
- From: Maciej Stachowiak <mjs noisehavoc org>
- To: Michael Meeks <michael ximian com>
- Cc: Havoc Pennington <hp redhat com>, Maciej Stachowiak <mjs eazel com>, Darin Adler <darin eazel com>, gnome-components-list gnome org
- Subject: Re: bonobo-activation; freeing base services ...
- Date: Sun, 28 Oct 2001 21:27:10 -0800
On 28Oct2001 07:10PM (-0500), Michael Meeks wrote:
>
> Ok,
>
> So forget the Atexit handler, I agree with Havoc that they are
> highly sub-optimal.
>
> So perhaps if we commit the patch - as was originaly posted, I can
> still shutdown the ORB more cleanly, in bonobo-activation - which
> allocates the resources itself ( instead of clawing inside it from
> libbonobo ). To re-iterate I really need a shutdown function to be able to
> get a success / failure indication so my regression tests fail correctly.
>
> On 28 Oct 2001, Havoc Pennington wrote:
> > Why not install the debug atexit() handlers and print the warnings if
> > getenv(ORBIT_DEBUG_OBJECT_LEAKS) != NULL, and install no warnings and
> > no handlers if that env variable is unset.
>
> This sucks - it's easy to detect these resource leaks, they often
> point to somewhat serious problems / a lack of understanding and IMHO it
> is possible and desirable that every program should be clean against them.
> The best way to achieve this is for a programmer to get a warning when he
> quits.
>
> So I will be encouraging everyone to do an explicit
> bonobo_shutdown in their code - which is what all the samples will do;
> neccessary only for debugging.
>
> May I commit ?
I still think explicit shutdown functions are an udue burden on the
programmer. I don't think memory debugging justifies them.
What do you think of my suggestion to be able to mark particular
objects immortal? That seems like a cleaner solution and it would take
the noise out of your regression tests. Clearly not freeing the ORB or
the base services in bonobo-activation is harmless except for the
warning noise, so let's remove the noise instead of putting the burden
on application developers.
Regards,
Maciej
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]