Changeset 325 for Generics


Ignore:
Timestamp:
Feb 8, 2012, 1:05:59 PM (12 years ago)
Author:
chronos
Message:
  • Fixed: Error in writing same object to TListObject item cause freeing of object.
Location:
Generics/TemplateGenerics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Generics/TemplateGenerics/Demo/Demo.lpi

    r312 r325  
    8383        <TopLine Value="47"/>
    8484        <CursorPos X="20" Y="60"/>
    85         <UsageCount Value="13"/>
     85        <UsageCount Value="15"/>
    8686        <Loaded Value="True"/>
    8787      </Unit3>
     
    463463        <TopLine Value="11"/>
    464464        <CursorPos X="34" Y="24"/>
    465         <UsageCount Value="19"/>
     465        <UsageCount Value="21"/>
    466466        <Loaded Value="True"/>
    467467      </Unit51>
     
    583583        <Filename Value="../Specialized/SpecializedStream.pas"/>
    584584        <UnitName Value="SpecializedStream"/>
    585         <IsVisibleTab Value="True"/>
    586585        <EditorIndex Value="8"/>
    587586        <WindowIndex Value="0"/>
    588587        <TopLine Value="106"/>
    589588        <CursorPos X="48" Y="107"/>
    590         <UsageCount Value="13"/>
     589        <UsageCount Value="15"/>
    591590        <Loaded Value="True"/>
    592591      </Unit66>
     
    623622      <Unit71>
    624623        <Filename Value="../Generic/GenericStream.inc"/>
     624        <IsVisibleTab Value="True"/>
    625625        <EditorIndex Value="7"/>
    626626        <WindowIndex Value="0"/>
    627         <TopLine Value="1"/>
    628         <CursorPos X="13" Y="12"/>
    629         <UsageCount Value="13"/>
     627        <TopLine Value="40"/>
     628        <CursorPos X="18" Y="20"/>
     629        <UsageCount Value="15"/>
    630630        <Loaded Value="True"/>
    631631      </Unit71>
     
    636636        <TopLine Value="891"/>
    637637        <CursorPos X="18" Y="908"/>
    638         <UsageCount Value="11"/>
     638        <UsageCount Value="13"/>
    639639        <Loaded Value="True"/>
    640640      </Unit72>
     
    645645        <TopLine Value="739"/>
    646646        <CursorPos X="18" Y="750"/>
    647         <UsageCount Value="11"/>
     647        <UsageCount Value="13"/>
    648648        <Loaded Value="True"/>
    649649      </Unit73>
     
    654654        <TopLine Value="8"/>
    655655        <CursorPos X="34" Y="21"/>
    656         <UsageCount Value="10"/>
     656        <UsageCount Value="12"/>
    657657        <Loaded Value="True"/>
    658658      </Unit74>
  • Generics/TemplateGenerics/Generic/GenericListObject.inc

    r312 r325  
    7575procedure TGListObject.Put(Index: TGListIndex; const AValue: TGListItem);
    7676begin
    77   if OwnsObjects then FItems[Index].Free;
     77  if OwnsObjects and (FItems[Index] <> AValue) then FItems[Index].Free;
    7878  inherited Put(Index, AValue);
    7979end;
Note: See TracChangeset for help on using the changeset viewer.