Silvio a Beccara a écrit:
Hi Jean,
thanks for your reply, and syggestion. I think I cannot implement, because I have many places where I should point to that vector. So I would need something different. To clarify what I'm doing, here's an example:
( aDynamicVector is a schema type, like the follwing:
aDynamicVector = ^TVecDob; TVecDob (Size: Integer) = array [ 1 .. Size ] of double; )
procedure resize ( var kets: aDynamicVector );
new ( kets, 10 )
after that kets point to a new vector, but the old vector it was pointing to is lost (you have not disposed it ?) Unless you have elsewhere an other pointer which keeps the address of the old vector, and may enable you to dispose of it, you fill your heap (not stack) with lots of vectors you have no more way to use.
........ ........
end;
and then I call it:
resize ( aKet );
where for instance the size of aKet was 9.