omni::event1::detach_const
NAME

omni::event1::detach_const

A member function of omni::event1

#include <omni/delegate/1.hpp>
template < class T, ret_t (T::*fnptr)(PT1) const > void omni::event1::detach_const(const T& obj)


OVERLOADS

template < class T, ret_t (T::*fnptr)(PT1) const > void omni::event1::detach_const(const T *const obj)

SYNOPSIS

Detach the last attached member function that matches.

top

DESCRIPTION

Removes the last attached delegate that matches the signature, method and object of the delegate being passed in, subsequently calling that delegates destructor. If there is no match, nothing happens and no errors are thrown.

top

PARAMETERS

obj - The instance of the class to reference T - The type of class to associate with the delegate fnptr - The function to detach

top


CONSIDERATIONS

If the OMNI_SAFE_EVENT defines are not enabled, it is undefined if this event is invoked and edited at the same time; i.e. a race condition can occur if you detach to an event from one thread while invoking from another.

top


NOTES

See the notes on omni::delegate::~delegate about the implications regarding destruction of the delegate class while a bound function is still running.

top