-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak while using firewall.go #39
Comments
@pepperoni01 this is hopefully fixed by a PR submitted by @cuongvn98 Please let us know if we can close it |
Unfortunately, memory leak still occurred while using the exact same code provided above. |
Thanks for the update @pepperoni01 I’m not really going to be able to dedicate time to this myself, but perhaps @cuongvn98 might be happy to work with you? Also a long shot, but have you tried forcing Go’s garbage collector to run between calls? I think you can force it in the ‘runtime’ package, as I know from experience with other pieces of code that it will allow memory to rise dramatically if it is running on a high memory machine, before attempting to reap. |
Yes, I've tried forcing Go's garbage collector. It does something, but not much. |
@pepperoni01 As my investigate all action as oleutil.GetProperty, ToIDispatch should be graceful release after use. It seem as memory of this variable is out of manage by Go . |
Hey @iamacarpet.
I'm trying to use a part of a package to control windows firewall.
It works well, but it doesn't release memory. For example, running functions in a loop will cause continuous incremental memory usage.
Looking at the library, it seems that this topic is taken care of(functions like firewallAPIRelease, firewallRulesEnumRealease).
Here's an example of code that replicates an issue.
The text was updated successfully, but these errors were encountered: