Dispose not disposing.

Consider the following code that leaks memory: TStringRecord = record Value: string; end; PStringRecord = ^TStringRecord; procedure TForm1.Button1Click(Sender: TObject); var StringRecord: PStringRecord; p: Pointer; //untyped pointer begin //ocate record that contains a string field New(StringRecord); StringRecord.Value := 'foo'; //Later on ...
Posted On: Tuesday 27th of November 2012 12:57:39 AM Total Views:  312
View Complete with Replies