We have an customer designed board based on G120 module. The board run well in general but the output port changed the state (from true to false) every time when GC run. The GC run every 6-7 minutes. The same issue occurred on multiple boards. We have eliminated the possibility that the port was changed by Write (or Close) method from the code itself. We are also sure that there was no constructor code “new output port” involved during GC running. Any help would be much appreciated.
Thank you all very much for pointing the right direction.
The output port is declared in a class and the class implements IDisposable interface. After removing the Dispose call, the system run over 15 hours and the output port stay with no changes. It seems like always better to let GC to release any unused resource like output port, etc instead of implementing the IDisposable interface manually in the embedded world.
Again, thanks for the help. Much appreciated. You guys are great.