From e8d6eee1b018a4619b3dcc02ff47847e9c138e75 Mon Sep 17 00:00:00 2001 From: Fredrik Mellbin Date: Thu, 2 Feb 2006 22:20:49 +0000 Subject: [PATCH] Added destructor -> no memory leaks Originally committed to SVN as r59. --- core/aegisublocale.cpp | 3 +++ core/aegisublocale.h | 1 + 2 files changed, 4 insertions(+) diff --git a/core/aegisublocale.cpp b/core/aegisublocale.cpp index 728fca8cc..b077d8a03 100644 --- a/core/aegisublocale.cpp +++ b/core/aegisublocale.cpp @@ -53,6 +53,9 @@ AegisubLocale::AegisubLocale () { curCode = -1; } +AegisubLocale::~AegisubLocale() { + delete locale; +} ////////////// // Initialize diff --git a/core/aegisublocale.h b/core/aegisublocale.h index d84373e0b..ef904db9c 100644 --- a/core/aegisublocale.h +++ b/core/aegisublocale.h @@ -53,6 +53,7 @@ public: int curCode; AegisubLocale(); + ~AegisubLocale(); void Init(int language); int PickLanguage(); };