Serial port left open when sketch program closed

Hello,

I also came across this topic:

I have NOT tested it but it may have potential for adding a clean exit (saving data, closing serial port etc.) to sketches.

:)