Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Latest commit

 

History

History
91 lines (61 loc) · 3.91 KB

module-genericreleasenotifier-class.md

File metadata and controls

91 lines (61 loc) · 3.91 KB
description title ms.date ms.topic f1_keywords helpviewer_keywords ms.assetid
Learn more about: Module::GenericReleaseNotifier Class
Module::GenericReleaseNotifier Class
09/17/2018
reference
module/Microsoft::WRL::Module::GenericReleaseNotifier
module/Microsoft::WRL::Module::GenericReleaseNotifier::callback_
module/Microsoft::WRL::Module::GenericReleaseNotifier::GenericReleaseNotifier
module/Microsoft::WRL::Module::GenericReleaseNotifier::Invoke
Microsoft::WRL::Module::GenericReleaseNotifier class
Microsoft::WRL::Module::GenericReleaseNotifier::callback_ data member
Microsoft::WRL::Module::GenericReleaseNotifier::GenericReleaseNotifier, constructor
Microsoft::WRL::Module::GenericReleaseNotifier::Invoke method
244a8fbe-f89b-409b-aa65-db3e37f9b125

Module::GenericReleaseNotifier Class

Invokes an event handler when the last object in the current module is released. The event handler is specified by on a lambda, functor, or pointer-to-function.

Syntax

template<typename T>
class GenericReleaseNotifier : public ReleaseNotifier;

Parameters

T
The type of the data member that contains the location of the event handler.

Members

Public Constructors

Name Description
Module::GenericReleaseNotifier::GenericReleaseNotifier Initializes a new instance of the Module::GenericReleaseNotifier class.

Public Methods

Name Description
Module::GenericReleaseNotifier::Invoke Calls the event handler associated with the current Module::GenericReleaseNotifier object.

Protected Data Members

Name Description
Module::GenericReleaseNotifier::callback_ Holds the lambda, functor, or pointer-to-function event handler associated with the current Module::GenericReleaseNotifier object.

Inheritance Hierarchy

ReleaseNotifier

GenericReleaseNotifier

Requirements

Header: module.h

Namespace: Microsoft::WRL

Module::GenericReleaseNotifier::callback_

Holds the lambda, functor, or pointer-to-function event handler associated with the current Module::GenericReleaseNotifier object.

T callback_;

Module::GenericReleaseNotifier::GenericReleaseNotifier

Initializes a new instance of the Module::GenericReleaseNotifier class.

GenericReleaseNotifier(
   T callback,
   bool release
) throw() : ReleaseNotifier(release), callback_(callback);

Parameters

callback
A lambda, functor, or pointer-to-function event handler that can be invoked with the parentheses function operator (()).

release
Specify true to enable calling the underlying Module::ReleaseNotifier::Release() method; otherwise, specify false.

Module::GenericReleaseNotifier::Invoke

Calls the event handler associated with the current Module::GenericReleaseNotifier object.

void Invoke();