You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it means that if creating the closure needs allocation, it will allocate. But in this case it is a static function literal so there is no allocation.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
This is an abbreviated version of a layout API from Gio.
Running
Note that the func literal on line 30 is reported as leaking, but the Benchmark reports no allocations.
What did you expect to see?
Allocations matching the reported leak.
What did you see instead?
No allocations, despite the leak.
What I'd like to achieve in Gio is that the
w
param at line 20 wouldn't leak. And perhaps it doesn't, as indicated by the allocation report.@mdempsky
The text was updated successfully, but these errors were encountered: