
Zitat von
Dax:
Nur so als Tip: die Interfaces sind nicht nur da, weil sie gut aussehen

Vielen Dank für den Hinweis. Ich habs halt nicht so mit den Interfaces, mir gings ähnlich wie
hier
Meine Lösung sieht nun so aus:
Delphi-Quellcode:
...
public
{ Public-Deklarationen }
myQueue : IJclStrQueue;
end;
...
procedure TForm7.Button1Click(Sender: TObject);
begin
myQueue := TJclStrQueue.create; // Default Size = 16
// myQueue := TJclStrQueue.create(16);
end;
procedure TForm7.Button2Click(Sender: TObject);
begin
myQueue.Enqueue('TestNo1');
myQueue.Enqueue('TestNo2');
myQueue.Enqueue('TestNo3');
end;
procedure TForm7.Button3Click(Sender: TObject);
begin
if not myQueue.Empty then memo1.Lines.Add(myQueue.Dequeue);
end;
procedure TForm7.Button4Click(Sender: TObject);
begin
// FreeAndNil(myQueue); // Unnötig da Interface ?
end;
...
Das funktioniert - so wie ich das erwartet hatte.
Vielen Dank nochmal
Gruß
wo