Someone experienced a memory leak with new desktop controls

did someone experienced a memory leak with new desktop controls
after migrated a project to new desktop… controls in 2021r3.x ?

i create controls and remove them at runtime mainly.

i have a build in window to track data from Runtime class.

i not find the cause :frowning:

I have not checked to see if I have any memory leaks. But, I am using the new desktop controls and adding/removing dynamically at runtime… so I am interested in leaks of this nature.

Do you use AddHandler? If so, are you always doing a RemoveHandler?

Use this:

And you can find your leaks.

4 Likes

yes

currently i spot a simple floating window
with 2 custom made icon buttons (DesktopCanvas) and a DesktopListBox.
if me open it with “= new windowxy” and close this via x the object count is not
same as before …
the window itself have also a backround color gradient.
but what ever i remark does not solve my problem.
i guess my issue dissapear if me remove the controls inside.
i have to copy this project to play with.

i use 2021r3.0 but not saw any fix with my issue in 2021r3.1.
maybe i should review the cases in feedback list.

thanks i will try this :slight_smile:

XojoInstruments

yeah, xojo break everything with this stupid renaming/changes each month …

1 Like

issue 1, why?

Var win As New WindowUsers 
win.Show

’win.Left = (Self.Window.Left + Self.Window.Width / 2.0) - win.Width / 2.0
’win.Top = Self.Window.Top + Self.KanbanProject1.Height + 32.0

Self is in this case a container control

usage of Self.Window. did not clean up and left a object behind.

Confirmed: <https://xojo.com/issue/67652>

5 Likes

NEVER use a new feature for production. It usually takes like a year to Xojo to release a decent version with less bugs.

2 Likes

I’ve caught a couple with this puppy. :slight_smile:

2 Likes

i made a workaround for Self.Window. via own event definition.

there are more issues where my object count goes up and i try to find the reason …

just a simple modal dialog with two canvas icon buttons, a label, a textfield and a method
that opens and return the text input.