From cd9f1b40b098bbc505011574153c545958cc1459 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Tue, 22 Jan 2019 10:09:08 -0300 Subject: [PATCH] Removes reference count form Actions --- headers/modsecurity/actions/action.h | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/headers/modsecurity/actions/action.h b/headers/modsecurity/actions/action.h index b1e0efc7..088ab66f 100644 --- a/headers/modsecurity/actions/action.h +++ b/headers/modsecurity/actions/action.h @@ -43,8 +43,7 @@ class Action { temporaryAction(false), action_kind(2), m_name(""), - m_parser_payload(""), - m_referenceCount(1) { + m_parser_payload("") { set_name_and_payload(_action); } explicit Action(const std::string& _action, int kind) @@ -52,8 +51,7 @@ class Action { temporaryAction(false), action_kind(kind), m_name(""), - m_parser_payload(""), - m_referenceCount(1) { + m_parser_payload("") { set_name_and_payload(_action); } @@ -92,19 +90,6 @@ class Action { } } - int refCountDecreaseAndCheck() { - this->m_referenceCount--; - if (this->m_referenceCount == 0) { - delete this; - return 1; - } - return 0; - } - - void refCountIncrease() { - this->m_referenceCount++; - } - bool m_isNone; bool temporaryAction; int action_kind; @@ -142,10 +127,7 @@ class Action { */ RunTimeOnlyIfMatchKind, }; - - private: - int m_referenceCount; -}; + }; } // namespace actions