Memory Issues: How to get the critical objects

Former Member
Former Member
Dear fellows,

programming my watch face, from time to time I'm facing troubles with getting out of memory. Especially when you work with custom fonts for anti-aliasing, memory is getting out of bounds very quickly. I would love to unterstand how you guys face memory problems and what you think are good practices to identify the critical objects. May someone can also explain me, how to understand the "Memory Usage Stats" right (see pic). Everytime I run my watch face, the Peak Memory is relatively low (eg 55.8kb). But after sending the new settings to the simulator (via App Settings Editor), Peak Memory jumps up to eg 67.2kb and crashes the simulator. Thank you for sharing your experience.

Cheers,
GB community.garmin.com/.../1443808.png
  • Settings. Think of it this way. When the new settings are sent, there'll be a period of time both old and new are there, so there will be a spike in memory usage. To reduce this, reduce your settings.

    Fonts - custom fonts do use a bunch of memory. Turning off anti-aliasing should help some, but it could be the fonts themselves.

    The larger the font, the more memory So 120 pixels high will take more than 100 pixels high. Also, what characters you have in the font has an impact. If you are just displaying a time, you probably only need 0-9 and ":", so don't include all the letters. Just want you need.