This is something that bothers me too sometimes. When you allocate dynamic or static memory, the initial contents of your variable will be random.

I can't really explain why the string contains component names. Probably because that memory is no longer in use. It's strange, because that data likely belonged to either delphi or your app, and both are still running.

One thing i wanted to say is that it's VERY important that you initialize any return value's in your functions, because they will return random data when you leave Result uninitialized. Those bugs can be very hard to kill. :twisted: