I have a FEZ Hydra (4.2) and a CP7 display. I have some jpg images that i am displaying on the screen for UI design and some Text. When i am operating the various functionalities, after some specific number of operations, the system goes out of memory. Is there something i need to do like dispose when i am using images and text? The error message is as follows.
GC: 12msec 4855236 bytes used, 1435896 bytes available
Type 0F (STRING ): 1884 bytes
Type 11 (CLASS ): 56364 bytes
Type 12 (VALUETYPE ): 1980 bytes
Type 13 (SZARRAY ): 8148 bytes
Type 03 (U1 ): 156 bytes
Type 04 (CHAR ): 816 bytes
Type 07 (I4 ): 1044 bytes
Type 08 (U4 ): 36 bytes
Type 0F (STRING ): 444 bytes
Type 11 (CLASS ): 5484 bytes
Type 12 (VALUETYPE ): 168 bytes
Type 15 (FREEBLOCK ): 1435896 bytes
Type 16 (CACHEDBLOCK ): 216 bytes
Type 17 (ASSEMBLY ): 31644 bytes
Type 18 (WEAKCLASS ): 96 bytes
Type 19 (REFLECTION ): 204 bytes
Type 1B (DELEGATE_HEAD ): 1116 bytes
Type 1D (OBJECT_TO_EVENT ): 288 bytes
Type 1E (BINARY_BLOB_HEAD ): 4741476 bytes
Type 1F (THREAD ): 1536 bytes
Type 20 (SUBTHREAD ): 144 bytes
Type 21 (STACK_FRAME ): 3504 bytes
Type 22 (TIMER_HEAD ): 72 bytes
Type 27 (FINALIZER_HEAD ): 2448 bytes
Type 31 (IO_PORT ): 216 bytes
Type 33 (I2C_XACTION ): 48 bytes
Type 34 (APPDOMAIN_HEAD ): 72 bytes
Type 36 (APPDOMAIN_ASSEMBLY ): 3780 bytes
Failed allocation for 5175 blocks, 62100 bytes
GC: performing heap compaction…
#### Exception System.InvalidOperationException - CLR_E_INVALID_OPERATION (6) ####
#### Message:
#### Microsoft.SPOT.Hardware.Port::ReservePin [IP: 0000] ####
#### Microsoft.SPOT.Hardware.PWM::Dispose [IP: 0017] ####
A first chance exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type ‘System.InvalidOperationException’ occurred in Microsoft.SPOT.Hardware.dll