I think it is beyond Streamy's scope to provide basic optimizations like this. Maybe contribute this to Quiver? Also, what's the relationship between Expando and GC? It seems what's happening here is the global map holds a reference to the returned closure, which holds a reference to the expando, which holds (not sure if this is true) a reference to every entity and value that ever calls the memoized globalfn.