diff --git a/src/StringIndexer.h b/src/StringIndexer.h index 0c45f2a..dc3777c 100644 --- a/src/StringIndexer.h +++ b/src/StringIndexer.h @@ -15,6 +15,16 @@ class StringIndexer std::string str; uint8_t used=0; friend class StringIndexer; + + #if EPOXY_DUINO + public: + // Workaround to avoid coredump in Indexer::release + // when destroying a Topic after the deletion of + // StringIndexer::strings map (which can occurs only with AUnit, + // never in the ESP itself, because ESP never ends) + // (I hate static vars) + ~StringCounter() { used=255; } + #endif }; public: using index_t=uint8_t;