Browse Source

Ensure that legacy code does not unnecessarily interfere with ARC.

rtl/inc/objpas.inc, TObject:
  * Free: don't call Destroy if the class is reference counted (there might be references left)

git-svn-id: branches/svenbarth/arc@28912 -
svenbarth 10 years ago
parent
commit
70e2785dbd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      rtl/inc/objpas.inc

+ 1 - 1
rtl/inc/objpas.inc

@@ -338,7 +338,7 @@
 
 
         begin
         begin
            // the call via self avoids a warning
            // the call via self avoids a warning
-           if self<>nil then
+           if (self<>nil) and not ARCIsRefCounted then
              self.destroy;
              self.destroy;
         end;
         end;