Container Reference

why is there still a container reference listed in runtime objects after it was closed? 2021r3.1


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 
  End If

This only iterates controls, NOT containers. Read here: A container is not a DesktopControl.


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

1 Like