why is there still a container reference listed in runtime objects after it was closed? 2021r3.1
TestRuntimeValues.xojo_binary_project
https://drive.google.com/file/d/1SwzAab09I3dkUasHqjj5r1tUTuAD5CyR/view?usp=sharing
why is there still a container reference listed in runtime objects after it was closed? 2021r3.1
TestRuntimeValues.xojo_binary_project
https://drive.google.com/file/d/1SwzAab09I3dkUasHqjj5r1tUTuAD5CyR/view?usp=sharing
Edit clearly there is something wrong with the docs or code. Xojo does return containers suddenly from the DesktopWindow.Controls so that must have been changed lately. Normally id didn’t do that since it seems to return (old RectControl) or (new) desktopControl. But a DesktopContainer is NOT a desktopControl. Or the docs are wrong or there is something else wrong.
For Each c As DesktopControl In Self.Controls
If c IsA DesktopContainer Then
DesktopContainer(c).Close
End If
Next
This only iterates controls, NOT containers. Read here: https://documentation.xojo.com/api/user_interface/desktop/desktopwindow.html.Controls A container is not a DesktopControl.
Try
MyContainer1.Close
I must say it looks like the MyContainer1 just remains in memory… probably a leak, it maintains at least 1 ref for some reason. I think it’s a bug.
It does return EmbeddedContainer controls but NOT DesktopContainer