Signal.disconnect

Remove a handler from the list of handlers to be called when emit() is called.

struct Signal(Types...)
@trusted
T
disconnect
(
T
)
if (
isHandler!(T, Types)
)

Return Value

Type: T

The handler that has been disconnected

Throws

Exception if handler is not registered (Always, even if asserts are disabled)

Examples

@safe void handler() {};
Signal!() onTest;
onTest.connect(&handler);
onTest.disconnect(&handler);
onTest.connect(&handler);
onTest();

Meta