Good day,
I'm using EW 8.30 on the STM32F469 device
Perhaps I am not understanding the EW documentation correctly. I've run out of RAM despite images being freed up, so I set up a test:
[1] I instrumented the EW calls to alloc and free RAM (EwAlloc and EwFree) with a (unit tested) list whihc keeps track of allocations and deallocations. When EwAlloc is called, the pointer and size are added to the list. When EwFree is called, the pointer is matched to the record in the list, and that record is removed from the list. This allows me to track RAM that EW has asked for, but not freed
[2] I created about 25 ExternBitmaps, and assigned to each an Image object. The image object .Name is set, and it loads and displays fine
[3] At this point, I stop the debugger, and save the pointer list
[4] Then I run it again, and with a user command, I create an event which sets .Name for each of the 39 images to "". The behaviour is as expected, and all of the images disappear from the UI, and do not return. (That's expected)
[5] Then I wait 5 minutes to ensure that the garbage collector takes action, although I know that the EW engine is supposed to run the garbage collecter every 10 seconds. I call EwReclaimMemory as well
[6] At this point, I stop the debugger again, and save the pointer list
[7] I pull the 2x files into Excel, and compare
[8] I find that the bitmap memory has not been freed up, even though I set .Name to "", and the images have disappeared from the screen. (The bitmap files occupy > 5k)
I have listed the before and after pointer lists for you as comments:
Kind Regards,
Rob