]> git.llucax.com Git - software/eventxx.git/blobdiff - eventxx
Add EVENTXX_NO_WARNING to avoid even_base_free() memory leak warning.
[software/eventxx.git] / eventxx
diff --git a/eventxx b/eventxx
index e2391b5026263fc81717360f065f71b0a66cdcec..2ee228dc3221a090f946de0796565c2badcecfcb 100644 (file)
--- a/eventxx
+++ b/eventxx
@@ -795,11 +795,13 @@ struct dispatcher
        /// Free dispatcher resources, see @ref Status section for details.
        ~dispatcher() throw() { event_base_free(_event_base); }
 #else
+#ifndef EVENTXX_NO_WARNING
 #warning "The dispatcher class *will* leak memory because of a libevent bug, " \
     "see http://www.mail-archive.com/libevent-users@monkey.org/msg00110.html " \
     "for more info an a patch. If you already have this patch, please " \
     "-DEVENTXX_EVENT_BASE_FREE_FIX to your compiler to make this message disappear " \
     "and really free the dispatcher memory using event_base_free()."
+#endif
 #endif
 
        /**