瀏覽代碼

* Fix memleak on refresh, spare record initialized twice

git-svn-id: trunk@38817 -
michael 7 年之前
父節點
當前提交
8f717ed66a
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      packages/fcl-db/src/base/bufdataset.pas

+ 3 - 2
packages/fcl-db/src/base/bufdataset.pas

@@ -2238,9 +2238,10 @@ begin
     InitialiseIndex;
     F.SetIndexProperties;
     end;
-  if Active then
+  if Active  then
     begin
-    B.InitialiseSpareRecord(IntAllocRecordBuffer);
+    if not Refreshing then
+      B.InitialiseSpareRecord(IntAllocRecordBuffer);
     if (F.Fields<>'') then
       BuildIndex(B);
     end