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
you create resources inside for loop and defer inside for loop, the defer function will execute after function returns, so you won't be able to clean resources inside for loop, it all will wait until function exists. I put close after for loop ended. so it will release the resources after for loop ends.
The initial author doesn't found the time to fix this completely, so this issue is meant to address the issue.
To Reproduce
N/A
Expected behaviour
N/A
Screenshots
No response
Attempted Fixes
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Fixes#121. `defer` in for loops can possibly lead to leaks.
The whole handling including the defer are now moved into anonymous functions outside the for loop and are called form the loop instead. This way the defer is handle when the inline function finishes
Description
As mentioned in #116
The initial author doesn't found the time to fix this completely, so this issue is meant to address the issue.
To Reproduce
N/A
Expected behaviour
N/A
Screenshots
No response
Attempted Fixes
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: