https://bugs.winehq.org/show_bug.cgi?id=53766
--- Comment #11 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Jason Millard from comment #10)
Just a follow up on this. Even though solved, this path is releasing an extra reference for me.
Given this code:
Sub Table1_init drain.CreateSizedBallWithMass 50/2, 100
Dim BOT BOT = GetBalls
Dim Balls(20) Balls(5) = BOT(0) End Sub
Prior to Table1_init, GetBalls Array contains 1 BallEx object with a m_dwRef count of 2 After Table1_init, that BallEx object has a m_dwRef count of 1.
Tricky stuff to track down...
This sounds unrelated, so please open another report for it. After trying the same thing on Windows, maybe GetBalls() has to addref on elements, and it doesn't in your custom implementation, then Balls(5) getting out of scope releases VT_DISPATCH element and you get 2 -> 1 change. I'm only speculating.