Fórum Matriz mista, como liberar memória #336915
29/01/2007
0
type
Tmatrizmista = Record
codigo: integer;
Ref: integer;
Produto: string;
quant: integer;
valor: Extended;
end;
Aí tenho um botão:
procedure TForm1.BitBtn3Click(Sender: TObject);
var
vetor:Array of Tmatrizmista;
i:integer;
begin
setlength(vetor,4);
vetor[0].quant:=1;
vetor[1].quant:=2;
vetor[2].quant:=3;
vetor[3].quant:=4;
for i:=0 to 3 do begin
showmessage(inttostr(vetor[i].quant));
end;
end;
Funciona beleza.
Quero liberar a memória para vetores em quande quantidade.
Alguem sabe?
Rinez
Curtir tópico
+ 0Posts
29/01/2007
Rinez
Em grande quantidade.
:lol:
Gostei + 0
30/01/2007
Massuda
var Vetor: array of TMatrizMista; ... // aloca memória SetLength(Vetor, 4); ... // libera todo o array Vetor := nil; ...
Gostei + 0
30/01/2007
Rinez
Muito obrigado pela sua resposta.
Prof. Zenir
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)