Delphi Handbooks Collection


Delphi XE Handbook


Delphi 2010 Handbook


December 20, 2007

Puzzled by the First Delphi Puzzle

Jacob Thurman, of Castalia fame, has launched a Delphi Puzzles web site. Very interesting idea. The first puzzle that was posted, though, seems to be incorrect...

Jacob Thurman, of Castalia fame, has launched a Delphi Puzzles web site. Very interesting idea.

The first puzzle that was posted, though, seems to be incorrect... It looks like (but we don't know for sure) that there should be a memory leak in a TStringList assignment, but as Ray Konopka pointed out in a comment (the thread of comments following the post is very nice) when you assign a string list to Lines property of a Memo component, its setter calls Assign to copy the string list content, rather than grabbing the string list reference and causing a memory leak. So the potential for a memory leak is there, but Delphi components prevent it.

Or maybe Jacob had something else in mind... the puzzle solution should show up on Friday. If the goal was to raise interest in the Delphi Puzzles web site, my blog post demonstrates its success!





 

1 Comments

Puzzled by the First Delphi Puzzle 

It is a wonderful idea to start this puzzle site. And
I would see what is the exact cause posted later
today. After reading the comments, have to say I
already learn a lot :-)
Comment by Li Yang [http://lextm.blogspot.com] on December 21, 06:57


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.