Free memory before exit; Print inactive nodes as '--------'