public void Clear() { //Note, the race condition that exists here would simply cause //A static method exit anyway since Target is always null for static //methods. m_isStatic = false; Target = null; } }
protected void Shutdown() { if (m_ignoreShutdownHandler) { return; } //If the caller did not want to be notified on shutdown // or they did but the callback failed. // clear all callbacks and initiate a disposal. if (!m_disposeOnShutdown && !m_disposeAndWaitCallback.TryInvoke()) { m_callback.Clear(); m_disposeAndWaitCallback.Clear(); StartDisposal(); } }