ecere: Temporary patch for http://ecere.com/mantis/view.php?id=659 (Leak instead...
authorJerome St-Louis <jerome@ecere.com>
Mon, 17 Oct 2011 23:04:17 +0000 (19:04 -0400)
committerJerome St-Louis <jerome@ecere.com>
Mon, 17 Oct 2011 23:04:17 +0000 (19:04 -0400)
A proper fix would be to ensure hierarchies are established in firstPass.ec before assigning Method objects to AST elements

ecere/src/com/instance.ec

index e4815e6..0a9730c 100644 (file)
@@ -1976,9 +1976,12 @@ static void FixDerivativesBase(Class base, Class mod)
                   if(method)
                   {
                      if(method.function) _class._vTbl[vMethod.vid] = method.function;
-                     delete method.name;
-                     delete method.dataTypeString;
-                     _class.methods.Delete((BTNode)method);
+                     if(!method.symbol)
+                     {
+                        delete method.name;
+                        delete method.dataTypeString;
+                        _class.methods.Delete((BTNode)method);
+                     }
                   }
                   else
                      _class._vTbl[vMethod.vid] = _class.base._vTbl[vMethod.vid];
@@ -3774,9 +3777,12 @@ static void FixDerivativeVirtualMethod(Class base, char * name, int vid, void *
       {
          if(method.function) function = method.function;
 
-         delete method.name;
-         delete method.dataTypeString;
-         _class.methods.Delete((BTNode)method);
+         if(!method.symbol)
+         {
+            delete method.name;
+            delete method.dataTypeString;
+            _class.methods.Delete((BTNode)method);
+         }
       }
       for(method = (Method)_class.methods.first; method; method = next)
       {