コード例 #1
0
 /// <summary>Cleans up unmanaged resources.</summary>
 /// <remarks>Called at end of child entity, after <see cref="Finish"/> and
 /// before <see cref="Reset"/>. Gets called for root entity only when the
 /// <see cref="ExpatParser&lt;X, E, U>">ExpatParser</see> instance that owns
 /// it gets disposed.</remarks>
 protected internal virtual void Cleanup()
 {
     lock (this) {
         RuntimeHelpers.PrepareConstrainedRegions();
         try { }
         finally {
             XMLParser *parser = xmlParser;
             if (parser != null)
             {
                 LibExpat.XMLParserFree(parser);
                 xmlParser = null;
             }
         }
     }
     GC.SuppressFinalize(this);
 }