Isn't it enough to just reset it with the factory ...
# spek
d
Isn't it enough to just reset it with the factory in afterEachGroup? I'm just trying to understand the implementation to know what to expect...
r
I did it to properly cleanup when you have nested group scopes.
Copy code
val a by memoized(CachingMode.GROUP) { ... }

group("first") {
// a will have a different instance

    group("second") { // a will have a separate instance }
}
d
Wow, you really thought of everything! 👍🏼