Hi Micheal On Wo, 2008-08-27 at 14:52 +0100, Michael Green wrote: > 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 I really do not know (but would like to) but it also does not work. - crashes at the creation point. Can you get it to work? DanieW
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal