Here's your problem. You allocate a new cloud and then you get a cloud instance from the list. The cloud you allocated is then lost, and the memory has been leakedOriginally Posted by dazappa
Just do tmpcloud := TCloud(clouds[i]); without the TCloud.Create before it. tmpcloud is just a pointer, you don't have to allocate storage for an object or something like that
Bookmarks