/// <summary> /// Removes all dead objects. /// </summary> /// <param name="objects">The objects collection to be freed of dead objects.</param> private static void RemoveDeadObjects(NinjectHashSet <object> objects) { objects.RemoveWhere(reference => !((ReferenceEqualWeakReference)reference).IsAlive); }
/// <summary> /// Removes all dead objects. /// </summary> /// <param name="objects">The objects collection to be freed of dead objects.</param> private static void RemoveDeadObjects(NinjectHashSet<object> objects) { objects.RemoveWhere(reference => !((ReferenceEqualWeakReference)reference).IsAlive); }