264 views
in GUI Development by
Hi!

In my project, I read around 2000 data from SD card memory and store in Embedded wizard Local variable for the purpose of displaying in a vertical list. That works fine. But after returning from that Unit, if I tried to read some data from flash memory in a different Unit, system freeze. Reading from flash fails. This happens only after read form SD card, store the data in local array and view in vertical list. According to my knowledge, the memory used by local array will be freed when I come out of the Unit. Since system freeze happens only after accessing that unit, Is there any way to make sure memory release after returning from specific Unit. Can I call EwReclaimMemory() function to free memory when I exit that UNIT? Do you suggest any better ways to handle this?

Thank you

 

Regards,

Thanushiyah

1 Answer

0 votes
by
Hello Thanushiyah,

the memory management (respective the garbage collection) is not related to a Unit. As long as an object is referred somewhere in your software, it is kept in the memory. As soon as an object is no more needed (because there is no reference) it is freed automatically. There is no need to call EwReclaimMemory() separately. It is called automatically after each screen update.

Maybe there is some issue with the flash reader / SD card reader? Try to separate the GUI from the data access and test each of them.

Best regards,

Manfred.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...