View Issue Details

IDProjectCategoryView StatusLast Update
0003215JEDI VCL00 JVCL Componentspublic2006-04-05 01:16
ReporterpawelgoluchAssigned Toobones 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.30 
Summary0003215: TJvDBCustomSearchComboBox Bookmarks memory leak
Description      while not EOF do
      begin
        Items.AddObject(FieldByName(FDataLink.FDataFieldName).DisplayText, GetBookmark);
        if Bookmark = Bmrk then
          CurIndex := N;
        Inc(N);
        Next;
      end;

I think that in function ReadList we've got memory leak during call GetBookmark function (see above). In the example below there is a memory leak (see comments)

type
 TExampleFrame = class(TFrame)
   ComboBox: TJvDBSearchComboBox;
 end;

implementation
{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
 DataModule: TDataM;
 Frame: TExampleFrame;
begin
 DataModule:= TDataM.Create(Application);
 Frame:= TExampleFrame.Create(PageList.Pages[0]{example owner});

 Frame.ComboBox.DataSource:= DataModule.TypesSource;
 Frame.ComboBox.DataField:= 'Type';

 Frame.Parent:= PageList.Pages[0];
 Frame.Free; //In that configuration there is
 DataModule.Free; //a memory leak
// DataModule.Free; and in that configuration
// Frame.Free; there isn't memory leak
end;
TagsNo tags attached.

Activities

obones

2006-04-04 02:41

administrator   ~0008852

A call to clearlist has been added in the destructor, this should solve this problem. It will be added to CVS as soon as the system is back online.

obones

2006-04-05 01:16

administrator   ~0008921

This is now in CVS

Issue History

Date Modified Username Field Change
2005-09-22 06:42 pawelgoluch New Issue
2006-04-04 02:41 obones Note Added: 0008852
2006-04-04 02:41 obones Status new => confirmed
2006-04-05 01:16 obones Status confirmed => resolved
2006-04-05 01:16 obones Resolution open => fixed
2006-04-05 01:16 obones Assigned To => obones
2006-04-05 01:16 obones Note Added: 0008921