I'm not sure if this is the right place to ask the question (I'm working on Mandoline), but this question feels sufficiently generic to be a mojo question. I'd like to create an object that creates an ApplicationConnection and tracks its lifetime (is destroyed when the connection goes away, for example). However, that object can also be destroyed by other means, by some user action. If that object has InterfaceFactories attached to the connection, then this seems to violate the assumption of ApplicationConnection that the InterfaceFactory must outlive it.
I can't see a way of closing an ApplicationConnection. What's the right pattern here? Thanks,
Fady