mirror of https://github.com/golang/go.git
With its memoization and refcounting, the cache is well suited to the sharing of other expensive resources, specifically those that interact with the file system. However, it provides no means to clean up those resources when they are no longer needed. Add an additional argument to Bind to clean up any values produced by the bound function when they are no longer referenced. For golang/go#41836 Change-Id: Icb2b12949de06f2ec7daf868f12a9c699540fa5b Reviewed-on: https://go-review.googlesource.com/c/tools/+/263937 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> Trust: Robert Findley <rfindley@google.com> |
||
|---|---|---|
| .. | ||
| memoize.go | ||
| memoize_test.go | ||