When an object in Ninject is bound with InTransientScope()
, the object isn't placed into the cache, since it's, er, transient and not scoped to anything.
When done with the object, I can call kernel.Release(obj)
; this passes through to the Cache where it retrieves the cached item and calls Pipeline.Deactivate
using the cached entry.
But since transient objects aren't cached, this doesn't happen. I haven't been able to figure out where (or who) performs the deactivation for transient objects. Or is the assumption that transient objects are only ever activated, and that if I want a deactivateable object, I need to use some other scope?