protected override void FreeManaged()
{
// Flush the underlying stream before closing.
if ((writeFilters != null) && (writeFilters.Count > 0))
{
// Pass an empty data with closing == true through all the filters.
WriteData(TextElement.Empty, true);
}
Flush();
if (_context != null)
{
_context.Dispose();
_context = null;
}
//writeBuffer = null;
base.FreeManaged();
}