ecere/gui/Label: Fixed memory leaks on watching labeledWindow
authorJerome St-Louis <jerome@ecere.com>
Wed, 26 Mar 2014 21:32:28 +0000 (17:32 -0400)
committerJerome St-Louis <jerome@ecere.com>
Wed, 26 Mar 2014 21:32:28 +0000 (17:32 -0400)
ecere/src/gui/controls/Label.ec

index 373723a..06dab84 100644 (file)
@@ -20,7 +20,8 @@ public:
          Size size;
          if(window)
          {
-            stopwatching(window, text);
+            stopwatching(window, caption);
+            stopwatching(window, disabled);
             delete window;
          }
          window = value;
@@ -58,7 +59,8 @@ private:
    {
       if(window && (window == master || window == parent))
       {
-         stopwatching(window, text);
+         stopwatching(window, caption);
+         stopwatching(window, disabled);
          delete window;
       }
       CommonControl::OnDestroy();
@@ -68,7 +70,8 @@ private:
    {
       if(window)
       {
-         stopwatching(window, text);
+         stopwatching(window, caption);
+         stopwatching(window, disabled);
          delete window;
       }
    }