class CompA {
ClassA(PicoContainer pc) {
// whoa, if registered with DefaultPicoContainer, this
will get a handle on that PC itself. Waaay bad.
}
}
People with complex needs should explicitly place an (arbitary) PicoContainer into another via registerComponentInstance(..). I do this in Jesktop and EnterpriseObjectBroker and do not want hosted component makers to have a hook to my kernel.
I hope I do not have to explain this one ...
It will take a long time.
Is that close to what you mean?
I mean I aggree that it should be impossible (unless manually enabled) to get an instance of the hosting container in the ctor.