MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ remove_hook()

bool MayaFlux::Nodes::Node::remove_hook ( const NodeHook &  callback)
virtual

Removes a previously registered callback.

Parameters
callbackThe callback to remove
Returns
True if the callback was found and removed, false otherwise

Unregisters a callback that was previously registered with on_tick(). After removal, the callback will no longer be triggered when the node produces new output values.

This method is useful for cleaning up callbacks when they are no longer needed, preventing memory leaks and unnecessary processing.

Reimplemented in MayaFlux::Nodes::ChainNode, and MayaFlux::Nodes::Generator::Counter.

Definition at line 29 of file Node.cpp.

30{
31 return m_callbacks.remove_by_key(callback.target_type());
32}
PickCallback callback
Definition Picker.cpp:22
bool remove_by_key(const std::type_info &key)
Removes every entry registered with this callable type.
HookList m_callbacks
Hooks fired on every tick.
Definition Node.hpp:478

References callback, m_callbacks, and MayaFlux::Nodes::HookList::remove_by_key().

+ Here is the call graph for this function: