public override void Dispose() { base.Dispose(); if (function != null) { function.Dispose(); function = null; } }