Главная страница | назад





Article #20506: How do I ensure a deep copy of an AnsiString?

Question:
I noticed that in certain cases I can have two AnsiStrings that point to the same memory location. How do I ensure a deep copy of an AnsiString?

Answer:
After assigning strX to strY, call strY.Unique().
This will ensure that seperate memory has been allocated for each String.

Last Modified: 18-JAN-00