EnterpriseDB / system_stats

A Postgres extension for exposing system metrics such as CPU, memory and disk information
Other
111 stars 24 forks source link

Memory leak on windows #21

Closed xianglin1998 closed 9 months ago

xianglin1998 commented 9 months ago

After my test, if function is implement from WMI, the all logic will memory leak after Get

VARIANT type need correct Clear

Read doc from Microsoft, we can get correct fixed. Release function is VariantClear.

https://learn.microsoft.com/en-us/windows/win32/api/wbemcli/nf-wbemcli-iwbemclassobject-get image

(BTW: Indeed very few people running commercial databases on Windows.)

neel5481 commented 9 months ago

Thank you @xianglin1998 WIP PR ( https://github.com/EnterpriseDB/system_stats/pull/22 )

xianglin1998 commented 9 months ago

Thank you.