fix:内存泄露
This commit is contained in:
		@@ -2,8 +2,7 @@
 | 
			
		||||
#include <stdio.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");
 | 
			
		||||
@@ -31,6 +30,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;
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user