Cold boot versus warm boot

I use a CerbuinoBee , SD card , a xbee ethernet module, and a serial inteface for a data acquisition and logging application.
After every few weeks I get IO errors, most likely running out of file handles. Until now I unplugged the power thus resetting the system.
I implemented a watchdog which resets the system very week, but after a few days the same error occurs.
My question is: is there from NETMF " point of view" , a difference between a cold and hard boot?

you better off fixing the memory leak issue you are running into…

1 Like

I know, but I cant find the leak…
So my question remains…
1: is there a functional difference between a cold and warm boot…
2: a possible mem leak is that multiple threads are suspended, whch are supposed to terminate normally. in that case my question would be : is there an API to monitor the thread table, and a function to kill a specific thread?

@ freeck - A warm reboot re initializes the CLR and restarts your program. A cold reboot resets the hardware, and then re initializes the CLR and starts your program. With a warm reboot, the state of any output pins you have set will be kept. With a cold reset, the pins go to their default states.

There is no way to enumerate through the running threads with the MF. But, you can keep track of all the threads you start. Of course, you would not want to kill any of the threads that are being used by the framework.

You can kill a thread by aborting it. This results in an exception being thrown in the thread, which you can catch and gracefully terminate the thread. Check the documentation for the Thread class.

@ Mike - thanks,

1: I had hoped there could be a subtle difference between warm and cold boot that could explains my problem…

2: Suppose a thread that suspends during a bulk file copy command: suppose I kill this thread and catch the abort exception, how can I be sure that all file handles involved in this bulk copy command are released, knowing that I do not know which file handles are locked…so I do not know what to Dispose? Or is this done automatically by the GC?
( sorry , No time to read the thread class doc yet).