MenuItem.Icon leak & crash

Hi,

anyone sees leaks with menuitem.icon?

I submitted a feedback case for this: feedback://showreport?report_id=46356

For me adding menu items with icons increases the memory needed and finally leads to a crash.

My App affect seriously with this leak.

Each menu item.icon takes memory forever.
If any menu with several items needs to recreate frequently leads to a crash (Windows only).

And it only present from 2016r1

Did anybody find a solution for this (except upgrading to the version it was fixed in)?

Don’t always assign an Icon - just assign an Icon if it’s not already the one you need.
While this doesn’t fix the memory leak, you at least limit the leak by not doing it more often than absolutely necessary.

[quote=400589:@Jürg Otter]Don’t always assign an Icon - just assign an Icon if it’s not already the one you need.
While this doesn’t fix the memory leak, you at least limit the leak by not doing it more often than absolutely necessary.[/quote]
It would definitely slow the leak down. The icons in question are colour swatches and due to the nature of our app can change quite often so I think we would still see quite a lot of leaking.

I have other solutions which I will explore but first wanted to make sure there wasn’t an easy workaround.

Thanks.