Re: bonobo-activation; freeing base services ...



Hi Guys,

	Atexit arguments aside - I'd like bonobo-activation to free
its resources - and _vitaly_ we must be able to control the order in
which things happen - otherwise really bad stuff happens. The bad
stuff can be CORBA going really wrong - with a destroyed ORB, or
simply the ORB moaning that reference leaks happened.

	In this case - when the ORB shuts down now, it moans about all
leaked references ( if any leaked ), and anything that was bad it will
warn you about. Extremely useful for catching silly bugs.

On Fri, 26 Oct 2001, Maciej Stachowiak wrote:
> > On the library level, it'd be pretty insane if you
> > had to call a shutdown function for every lib though.
>
> The logical conclusion is that libraries must avoid needing any kind
> of shutdown processing for correct operation.

	Well - why not do - as I plan to do inside libbonobo, allow
the user to explicitely shutdown the library, allow double shutdowns
to succeed transparently, and register a g_atexit for the shutdown
when you init.

	This way, the user can explicitely enforce a certain shutdown
order, regardless of system / portability etc. but normal people get
their resources freed too. Furthermore if g_atexit is found to be a
big pain on some systems, we have some flexibility to do it ourselves.

> I don't really know either. Michael, are your changes avoid leaking
> remote resources or to free memory?

	They avoid a warning saying:

** WARNING **: ORB: a total of 2 refs to 2 ORB objects were leaked

	These being the base services, oh - and it calls the ORB
destroy so the ORB is cleaned up correctly, and it moves the code that
currently does this from bonobo - to where the resources are allocated
in bonobo-activation.

	Anyhow - would my proposed hybrid solution satisfy you ?

	Regards,

		Michael.

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




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