ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: [myrmidon] cleaning up services
Date Tue, 04 Jun 2002 08:06:47 GMT

On Tue, 4 Jun 2002 11:57, Adam Murdoch wrote:
> Hi,
> There's a few places where we're not cleaning up services:
> - Scoped services in partitioned execution frames.
> - Services created by a workspace.
> - Task listeners.
> Any thoughts on the best way of dealing with these?  We have a couple of
> options: use Disposable, or add a cleanup method.
> For execution frame and workspace, a cleanup method might be better.  Main
> reason is that it is their clients, rather than the container, that need to
> inform them that they're no longer needed.

How about "void close()" instead as that seems to fit in more with what you 
are doing (ie deallocating resource rather than "cleaning" it to prepare for 

> For listeners, being on the other side of the task api, we really shouldn't
> use Disposable.  Which leaves a cleanup method, which the event manager
> would be responsible for calling when it gets disposed.

Why do you think that the EventManager should call close? My initial instinct 
would be to make it a responsibility of the caller. I could quite easily see 
the same listener reused after embeddor is shutdown and restarted. Thoughts?


Peter Donald
Clarke's Third Law: "Any technology distinguishable from 
magic is insufficiently advanced".

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message