WeakContextScope

open class WeakContextScope<in C>(val newRepo: () -> ScopeRegistry = { StandardScopeRegistry() }) : Scope<C>

Scope that map scope registries associated to weak contexts.

In essence, the context is weak, and for a given context, its registry will be GC'd when it is itself GC'd.

Constructors

Link copied to clipboard
fun WeakContextScope(newRepo: () -> ScopeRegistry = { StandardScopeRegistry() })

Types

Link copied to clipboard

Functions

Link copied to clipboard
open override fun getRegistry(context: C): ScopeRegistry

Get a registry for a given context. Should always return the same registry for the same context.

Properties

Link copied to clipboard
val newRepo: () -> ScopeRegistry

Inheritors

Link copied to clipboard