When you register a delegate, you can request an event revoker object (also known as an auto revoker). You can manually revoke your delegate by calling the event_revoker::revoke member function on that object, or you can just allow it to go out of scope. For more info, and a code example, see Revoke a registered delegate.
Syntaxtemplate <typename I>
struct event_revoker
Template parameters
typename I
The type of the event source (the object that raises the event).
Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)
Namespace: winrt
Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)
Member functions event_revoker::revoke functionRevokes the delegate from whose registration the event_revoker object was returned.
Syntaxvoid revoke() noexcept;
See also
Additional resources
In this article
Was this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4