I just glanced at it, but you're putting a whole bunch of things in functions that look like they should onlyu be done once (or if not, you're not freeing the originals before loading another)...
For instance:
a) In your main loop, put Repeat after loadarray or updatetimer=0
b) In your whiteboard1preloop() function, load the image and the font only once. That could mean to put them in another function that is only called ONCE before your Repeat in the main loop.
Stuff like that. There may be more. Basically, just look for where memory is allocated and not freed multiple times (like in your loop). =)
For instance:
a) In your main loop, put Repeat after loadarray or updatetimer=0
b) In your whiteboard1preloop() function, load the image and the font only once. That could mean to put them in another function that is only called ONCE before your Repeat in the main loop.
Stuff like that. There may be more. Basically, just look for where memory is allocated and not freed multiple times (like in your loop). =)