Nearly two years ago, Idera acquired apilayer, a collection of various cloud-based APIs. Idera being Embarcadero's parent company (and Embarcadero being the publisher of my favorite development tool, Delphi), I was interested to see what this was all about and looked at the handful of APIs available. One caught my eye and I made a note to come back and check it out more when the time was right.
The Delphi Debate series continues with another topic that has been discussed back and forth for ages. This time, instead of a procedure or function in the RTL, we are talking about three reserved words: the with, goto, and label statements which pre-date Delphi--they are part of the core Pascal language itself!
As a Delphi MVP, I was surveyed on my stance of the use of
FreeAndNil. In that questionnaire was included a question about the use of
Assigned(). Really? Is that debated as well? I couldn't find anything on the internet debating this except for an old discussion on StackOverflow. I use this function frequently and as I looked more deeply at what it does, I'm even more confident of its use.
When freeing an object in Delphi, simply calling its
Free method calls the object's
destructor and releases the memory allocated to the instance of the object. But it doesn't change the address of the referencing variable which, therefore, still points to the place in memory where the object existed. The released memory can be quickly reused by other objects or resources and if you try to access the object again without re-creating it, you could get an Access Violation or some other error or worse yet, unpredictable behavior.
You've probably used Delphi's Find in Files feature to search for an identifier or library function through multiple folders of source code. If you have backups of your source or multiple projects with copied or similar sets of routines and check the "Include subdirectories" checkbox, the search results could contain a lot of duplicates taking extra time to wade through them all. Wouldn't it be nice if there was a way to fine-tune the folders being searched?
In my last blog entry, I explained how I converted my original company logo in JPG format to SVG. That's sort-of like reverse-engineering to get the source code. Now that I have my logo in SVG format, I can more easily manipulate it and create custom derivations for specific purposes.