Fixed MemoryLeak in ConsoleWriterBase