Skip to content

Commit

Permalink
fix(mem): possible memory leak on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
uubulb committed Oct 5, 2024
1 parent 45e3591 commit 3773f6f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mem/mem_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) {
if err != nil {
return nil, err
}
defer common.PdhCloseQuery.Call(uintptr(counter.Query))

usedPercent, err := counter.GetValue()
if err != nil {
return nil, err
Expand Down

0 comments on commit 3773f6f

Please sign in to comment.