fix:内存泄露

This commit is contained in:
2024-11-20 11:18:13 +08:00
parent de03985fef
commit e57f0fa02c
8 changed files with 126 additions and 96 deletions

View File

@@ -1,8 +1,7 @@
#include "logging.h"
int main() {
Logging *log = newLogging();
Logger *logger = log->getLogger("testLogger", LOG_DEBUG);
Logger *logger = newLogger("testLogger", LOG_DEBUG);
logger->info("This is an info message");
logger->error("This is an error message%s", "123");
@@ -10,6 +9,6 @@ int main() {
logger->debug("This is a debug message");
logger->warning("This is a warning message%s", "123");
log->destroyLogging(log);
destroyLogger();
return 0;
}