Skip to main content
Thoughts from David Cornelius

Delphi Debates: Assigned

Category

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.

Delphi Debates: FreeAndNil

Category

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.

Delphi's Find in Files Trick

Category

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?

There is!

Switching From UniDAC to FireDAC

Category

Since upgrading my Delphi subscription from Professional to Enterprise, I've been slowly replacing third-party database components with FireDAC since the Enterprise edition comes with many more databases supported. One of the ones I've used a lot is Devart's UniDAC. UniDAC is a great database component suite. I've used them for many years, they have an excellent support forum, and frequent updates. I just don't want to pay for duplicate functionality--well, mostly duplicate; there are some advantages to using UniDAC but they're not deal-breakers for me.

Improve File Searching with UltraFinder

Category

I find the Windows File Explorer's built-in search feature to be painfully limited, slow, and inadequate for my needs. It's right there in the file explorer window so it's really handy but every time I use it, I'm frustrated. After recently acquiring the UltraEdit suite of tools, I started looking at one of the included products, UltraFinder. It is significantly better!

Major Drupal Upgrade Woes

Category

Upgrading multiple Drupal-based websites on a shared hosting platform has a gotcha: they all must use the same version of PHP--but different versions of Drupal have different PHP requirements. To make matters more interesting my (still supported) Drupal 7 sites need to be upgraded to Drupal 9 but must be upgraded to the non-supported Drupal 8 first. And then I ran into a photo site that isn't migrating its photos.
Subscribe to