mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +08:00
Merge pull request #1722 from uubulb/fix_windows_mem
fix(mem): possible memory leak on Windows
This commit is contained in:
commit
44c71b62c0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user