8 Feb
2023
8 Feb
'23
3:50 p.m.
While running in XCode's profiler, I noticed memory leaks when safearrays were used in `For Each` statements. The following code would leak a safearray allocation: ``` For Each obj In vpDict.Keys : Debug.Print "Key" : Next ``` This following code does not leak: ``` Dim x x = vpDict.Keys For Each obj In x : Debug.Print "Key" : Next ``` Fixes: https://bugs.winehq.org/show_bug.cgi?id=54456 -- v2: vbscript: Fix memory leak in owned safearray iterator https://gitlab.winehq.org/wine/wine/-/merge_requests/2141