private static void RemoveContext(IntPtr pContext) { lock (Context.allContexts) { Context.allContexts.Remove(pContext); } }