@SilverWarrior: IMO, unless you need some record (as in Pascal record type) for each world "tile", enumeration is over engineering it. If nested loops are faster and still do the job, I'd say go for it. Just comment them well so you'll be sure what they do at a later date.
Quote Originally Posted by User137 View Post
You create TStopWatch 22 times, but never free it. It is memory leak. Also i guess more interesting numbers come if StopWatch was used outside the "for I" loop. What kind of numbers do you get?

Also because of the caused function parameter load, compiler optimization might do things. Optimization might "inline" automatic if constants were used
That brings me to my game and similar issue. I've noticed slight memory leak (which doesn''t have much effect on gameplay, but I'm OCD and don't want it). I have proper destructors for all my classes and at the end of program I .Destroy() them, but do I also have to execute .Free() afterwards?