diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/internal/log.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h index b66bf55b..b8efb161 100644 --- a/include/libcamera/internal/log.h +++ b/include/libcamera/internal/log.h @@ -29,7 +29,6 @@ class LogCategory { public: explicit LogCategory(const char *name); - ~LogCategory(); const char *name() const { return name_; } LogSeverity severity() const { return severity_; } @@ -48,8 +47,9 @@ extern const LogCategory &_LOG_CATEGORY(name)(); #define LOG_DEFINE_CATEGORY(name) \ const LogCategory &_LOG_CATEGORY(name)() \ { \ - static LogCategory category(#name); \ - return category; \ + /* The instance will be deleted by the Logger destructor. */ \ + static LogCategory *category = new LogCategory(#name); \ + return *category; \ } class LogMessage |