Finalizearray Example

Asked

Viewed 78 times

0

I’m trying to clear a vector after performing a procedure, since I need to use the same vector to make the next loop of the procedure. After a lot of research, I found the appropriate filter to clean the vector being FinalizeArray.

I found the method in this documentation http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.FinalizeArray

But I couldn’t find an example to understand the right way to apply.

If I execute the command that way:

FinalizeArray(Titulosdelete,Titulosdelete,count);

At Debug’s time I’ll have the error:invalid pointer operation

Can someone give me a correct example I believe I’m missing the second parameter.

  • What did you mean by clearing the vector? Just fill it with zeros or release the memory associated with the vector by disabling its reference?

  • Just fill it with zero. Since it is a dynamic vector, what I want is to reset all addresses and start all over again from position [0].

1 answer

2


Browser other questions tagged

You are not signed in. Login or sign up in order to post.