浏览代码

* Correctly free objects when destroying stringlist instance

git-svn-id: trunk@20265 -
michael 13 年之前
父节点
当前提交
723482c814
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      rtl/objpas/classes/stringl.inc

+ 1 - 4
rtl/objpas/classes/stringl.inc

@@ -1133,10 +1133,7 @@ Var I : Longint;
 begin
   FOnChange:=Nil;
   FOnChanging:=Nil;
-  // This will force a dereference. Can be done better...
-  For I:=0 to FCount-1 do
-    FList^[I].FString:='';
-  FCount:=0;
+  Clear;
   SetCapacity(0);
   Inherited destroy;
 end;