Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] [IdAS] IContextFactory.getContexts()

My understanding was that we were changing that to return only the Context instances that the factory has instantiated. The caller would then have to call isOpen on each if they wanted to know that.
 
Still, Greg's "mem-leak" point is still a problem (in order for the factory to know what's been instantiated, it must keep a reference. Keeping a reference means keeping the object around).
 
My preference is to remove the method until a compelling use case stated, and these issues addressed.
 
Jim

>>> Greg Byrd <gbyrd@xxxxxxxx> 7/28/06 8:13 AM >>>
I'm still confused about the meaning of IContextFactory.getContexts().

The current wiki says:  "return the set of Context References (URIs)
that are currently open and are managed by this provider".

So, a ContextFactory can: (a) keep a list of all created Context
instances, and (b) query each to see whether it's open or not.  I can
see that, but when does a Context get deleted from this list?  For a
long-running service, this could be a significant memory leak.

We could say that close() effectively removes it from the list.  Then we
need to worry about what happens when a Context is closed twice.  And we
either notify the ContextFactory of the close, or have the factory
remove it the next time it executes getContexts().

I know that my Use Case #5 has the user asking about which Contexts are
available.  But I just added this because it's something we talked about
at some point.  Is there a requirement for this?  (Note: We can still
have "registered" Contexts that are advertised via the IdASRegistry.)

...Greg

_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev

Back to the top