As I was working on adapting my app to the new Windows Dark Mode, I noticed that my app uses 1.4 GB of memory when run in debug or build mode. Also my app is sluggish.
The same code built with 2021R1 uses 550 MB of memory. I was quite a bit shocked by the difference.
Has anything changed in the way the apps consume memory or render when compiled with 2021R3?
I do remember just a huge memory leak found during tests on iOS tied to the paint event (fixed and not present in the released R3). On Windows I don’t remember. If leaks are occurring, I’m very interested in knowing them. I always ask users the minimum of 4Gb of RAM, but some even try by themselves to use apps on 2GB systems. A 1.4GB consumption from start means a crash waiting to happen.
Compressed PNG images comes to mind. Maybe unrelated with such case.
After spending a bit of time on it,. the huge increase in memory seems to come from the WebKit HTMLViewer update.
When the app built with 2021R1 is run, it uses about 250 MB and. It also runs 14 cefsubpro which uses about 20 MB each.
When the app built with 2021R3 is launched, it uses 500 MB and then 250 MB a few minutes later. it also runs 16 cefsubpro (why 16 ?) which uses about 50 MB each. But then later, they use about 20 MB each.
You said it decreases to 20MB. I don’t know, maybe some 30MB transient allocation from the engine for some startup reason and later some kind of “garbage collected” as soon as it notices the content sent to it was not as big as it could potentially be and freed an excess.