WeakEventManager::Purge Method (Object^, Object^, Boolean)
Removes inactive listener entries from the data list for the provided source. Returns true if some entries were actually removed from the list.
Assembly: WindowsBase (in WindowsBase.dll)
Parameters
- source
-
Type:
System::Object^
The source for events being listened to.
- data
-
Type:
System::Object^
The data to check. This object is expected to be a WeakEventManager::ListenerList implementation.
- purgeAll
-
Type:
System::Boolean
true to stop listening to source, and completely remove all entries from data.
The Purge method has a default implementation that will remove all entries when data is a WeakEventManager::ListenerList.
Notes to Implementers:
If the underlying type for the Item is something other than WeakEventManager::ListenerList, or contains data beyond a WeakEventManager::ListenerList, you must override the Purge method. The override should provide purge behavior for the alternate type items list. Generally, the override should provide behavior without calling the base implementation. If a specific WeakEventManager::ListenerList still needs clearing, call Purge.
Available since 3.0