diff --git a/src/cleanuphelper.h b/src/cleanuphelper.h index 3279f2a..d4a1d1a 100644 --- a/src/cleanuphelper.h +++ b/src/cleanuphelper.h @@ -19,6 +19,15 @@ public: (*m_cleanup)(); } + void cleanup() + { + if (m_cleanup) + { + (*m_cleanup)(); + m_cleanup = std::nullopt; + } + } + void disarm() { m_cleanup = std::nullopt;