Hi <@U72C3TBDH> The pleasure was mine :slightly_sm...
# kodein
s
Hi @streetsofboston The pleasure was mine 🙂 So, this really depends on the
AppSessionScope
and
UserSessionScope
implementation. I suppose they are using
MultiItemObjectRegistry
? There's a
clean
method on it, to "clear" the registry, which makes all objects go out of scope. However, this might not be necessary if the registry is only "held" by an object that goes out of scope. GC can take care of that. Using a
WeakContextScope
can also be a way to not manually clean the registry.
s
@salomonbrys Thanks for your reply. The problem I find is how to make the
UserSessionScope
being tied to the
AppSessionScope
, ie when the old
AppSessionScope
releases its registry, the current
UserSessionScope
should release its registry as well. In short: How to I scope a scope 🙂 I could do some odd trickery, but is there an ‘official’ Kodein way to scope scopes (subscope)
s
Wow... Scope inception. No way to do that easily I guess. I had never thought about it... Just when I thought Kodein DI was done and I could focus on the next Framework component... I'll definitely be thinking about that for next release ;)
s
Hahahaha… Welcome to bring you more work! 🙂
s
Ha! Wow, you are fast!!! Thank you!
s
😉