/// <summary cref="DisposeBase.Dispose(bool)"/> protected override void Dispose(bool disposing) { if (disposing) { // Assign parameters and adjust their indices for (int i = 0; i < parameters.Count;) { if (parameters[i].IsReplaced) { parameters.RemoveAt(i); } else { ++i; } } var @params = parameters.ToImmutable(); for (int i = 0, e = @params.Length; i < e; ++i) { @params[i].Index = i; } Method.parameters = @params; // Dispose all basic block builders foreach (var builder in basicBlockBuilders) { builder.Dispose(); } Method.ReleaseBuilder(this); } base.Dispose(disposing); }
/// <summary cref="DisposeBase.Dispose(bool)"/> protected override void Dispose(bool disposing) { // Assign parameters and adjust their indices var @params = parameters.ToImmutable(); for (int i = 0, e = @params.Length; i < e; ++i) { @params[i].Index = i; } Method.parameters = @params; // Dispose all basic block builders foreach (var builder in basicBlockBuilders) { builder.Dispose(); } Method.ReleaseBuilder(this); }