Hi Danie,
Other than what was pointed out with create/destroy, wouldn't it create
a memory leak with the NEW?
procedure TForm1.Button1Click(Sender: TObject);
begin
if pTopCV = nil
then begin
NEW( pTopCV );
pTopCV^ := TControlVolume.Create(PanelDraft);
Instead, simply do:
if not assigned(pTopCV) then begin
pTopCV^ := TControlVolume.Create(Paneldraft);
(Same goes for the pTopCV.next entry).
-- Mike
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal