From a3a4907d30bdd23f91d18b70326aa07cb31720f1 Mon Sep 17 00:00:00 2001 From: Hideaki Tai Date: Wed, 30 Sep 2020 16:27:44 +0900 Subject: [PATCH] add clear_subscribers to unsubscribe all funcs #5 --- Artnet.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Artnet.h b/Artnet.h index 34f1225..bdde5c7 100644 --- a/Artnet.h +++ b/Artnet.h @@ -394,6 +394,12 @@ namespace arx unsubscribe(u); } + inline void clear_subscribers() + { + unsubscribe(); + callbacks.clear(); + } + protected: void attach(S& s) { stream = &s; }