Properly deal with classes destructors

There are some classes such as AuditLog that demands a reference count. That is
needed because this class can be used by different instances of the Rules
classes.
This commit is contained in:
Felipe Zimmerle
2015-07-13 12:28:25 -03:00
parent 0c98bdc80b
commit 001d5ebf7f
13 changed files with 100 additions and 18 deletions

View File

@@ -45,6 +45,10 @@ ModSecurity::ModSecurity()
}
ModSecurity::~ModSecurity() {
}
/**
* @name whoAmI
* @brief Return information about this ModSecurity version and platform.
@@ -162,6 +166,18 @@ extern "C" const char *msc_who_am_i(ModSecurity *msc) {
}
/**
* @name msc_cleanup
* @brief Cleanup ModSecurity C API
*
* Cleanup ModSecurity instance.
*
*/
extern "C" void msc_cleanup(ModSecurity *msc) {
delete msc;
}
/**
* @name msc_init
* @brief Initilizes ModSecurity C API