Posts

Showing posts from October, 2021

Focus On: Deleaker - a Delphi, C++ & C# Memory Leak Detector

Image
A week or so ago Artem Razin got in touch with me to ask if I'd take a look at his  Deleaker  program and mention it in my blog. I agreed and this blog is about how I've been using it and what I've discovered. This is by no means a definitive account of how to use the program and I'm far from an expert user. For the final word on this program, see the Deleaker docs . You can get a free trial and pricing info from the Deleaker Website . Deleaker stand-alone window Disclosure This is the first blog I've written about a commercial third party program. For the sake of transparency I want to disclose that  I received a free license for this product from Artem, for which I'm grateful. Offer to other developers I'm happy to offer to blog about other useful development software (or Delphi libraries) from other small developers. For more info see my " Promoting Delphi developers & applications? " blog post. So what is it? Deleaker is memory leak detecto

Promoting Delphi developers & applications?

Image
The other day I was approached by a developer to ask if I would feature his application on my blog. I'd not done this before but, after some thought, I decided I would. If I can help promote the Delphi community in my own small way then why not? The upshot is I'm publishing a blog post about Deleaker , a memory leak tracker and profiler, in the next couple of days. So I thought "why not offer to do this again for other developers?" Open source or commercial, I don't mind. Applications or libraries, either is fine. But it's got to be either written in Delphi or useful to Delphi developers. A profile of Delphi developers would also be considered. I'd prefer to help publicise small teams and single handed developers who don't have large advertising budgets, but that's not an absolute rule. And no, I don't want paying! Not unless you're Microsoft et al. Then large wheelbarrows of £50 notes would be more than acceptable. I'm thinking of two

New search facility on the Delphi Tips micro-site

Image
Ever since the old DelphiDabbler.com closed last year and moved to its new home on Creo Hosting (thanks guys), the Delphi Tips part of the site never got properly re-established. Instead it got parked on GitHub Pages as  https://delphidabbler.github.io/delphi-tips/ . One of the things that was lost in moving from a PHP driven site to Jekyll was the custom search. I've no made partial amends  by putting a Google powered search bar on each page. Of course you do get the usual advertising crap, but the results below the adverts seem to be returning some useful information from the micro-site. Still no new tips though! Anyone who wants to contribute please create an issue on the delphidabbler/delphi-tips project and upload your tip. I'll work through it and covert it to the appropriate format. One day I might enable Markdown formatted tips to be posted, but don't hold your breath"

Released v1.3.0 of my HTML Resource Compiler

Image
Well, this one's pretty niche! And it's getting nich-er-er-er by the day as Internet Explorer dies a slow death. Why's that? Well, HTMLRes compiles individual files files into a single 32 bit resource file, with the contents of each file being recorded in a separate RT_HTML resource. The resources have the same name as the files. These resources have two uses: Internet Explorer can display RT_HTML resources compiled into a DLL using the res:// protocol. This article explains . The IE based TWebBrowser can do the same. Therefore any program that uses TWebBrowser  can embed the HTML & images it displays in the program's resources. This means you don't have to distribute such files with the program and read them from the file system.  The same article explains . Big deal - why not use BRCC32 to compile them then? Well, my  CodeSnip program uses the approach in point 2 above in parts of its UI, and I include some HTML and image files in RT_HTML resources whe

Added unit tests and demo code to Code Snippets Database

I've just released v2.0.1 of the DelphiDabbler Code Snippets Database . This release adds some unit tests and demo code for some of the snippets. The code was previously available, but really well hidden on my Google Drive. Now you can get the code from the main Code Snippets repository. Go to the release download page . There are three separate files for download. The tests are in  csdb-v2.0.1-tests.zip . Notes: There are no new or updated snippets in this release - it's simply the tests and demos that have been added. The new tests have only been tested with old versions of Delphi. I'll be updating them over time. But if you want to do that, then I won't object! New tests and bug fixes are always welcome - you can now submit them via the project GitHub repo . Just fork the repo, switch to the develop  branch, create a feature branch off develop , make your changes and then open a pull request.

DelphiCon 2021 announced

This year’s official online Delphi conference on all things Delphi has been announced. It's free, and its scheduled for 16th to 18th November. For a change I've decided not to be a last minute Larry and just booked myself in! You can book now at  https://delphicon.embarcadero.com/ . Keep checking back there as details of speakers etc. are announced.

How to find all Delphi / RAD Studio installations from code - new article

Image
I've just published a new article on my website for the first time in a long, long, long ... time. It takes a look at how you can programmatically detect which versions of Delphi (or RAD Studio) you have installed (locally) on your system. It goes on to show how to find the installation folders and how to find various exe files: I focus on the 32 and 64 bit command line compilers. It's a short step from there to compiling Delphi (and C++?) code from within your program, like my CodeSnip program actually does. I've not gone in to how to do this in my article, but I will if there's interest. Here's the result of running some of the code from the article on my home machine, showing what I've got installed: Compiled with Delphi 11 Alexandria

The System Information Unit Now Detects Windows 11

Probably the quickest I've ever added support for detecting a new version of Windows to the System Information Unit. But that's because most of the work was done last month and I just needed the build number to be finalised. It's a long time since MSs versioning made any sense at all. This time it's even stranger. Windows 11 is version 10.0 You know like Windows 10 is version 10.0! Well that makes sense. The only difference is in the build numbers - Win 10 goes as far as build 19044 so far. Windows 11 pre-releases start at 21996. Even stranger is that the Win 11 release hasn't even got its own build number - it's revision 1094 of build 22000 as far as I can see from reading MS documentation. Does that give an indication of how much of an update MS think Windows 11 actually is? More info about the System Information Unit on my website . Download the new version 5.7.0 from SourceForge .

SSL Errors on DelphiDabbler.com? Everything's Cool(ish)

The Chrome browser on my Android tablet reported a problem with the security certificate on https://delphidabbler.com this morning (2021/10/04 06:50 GMT). Neither my Android phone nor my PC reported such errors a little later. Neither did my tablet when I tried Firefox. Anyhow I've checked with  https://www.sslshopper.com/ssl-checker.html#hostname=delphidabbler.com to check and the certificate was OK at 07:57 GMT (12:57 PST). https://www.delphidabbler.com  was fine too. Anyhow - if you're getting the same error be assured everything seems to be now cool! If in doubt use http://delphidabbler.com instead - or even the mirror on https://delphidabbler.github.io/ UPDATE 1: Just (09:23 GMT) received a similar error while using Subversion to commit a change to SourceForge. Like my site, the problematic certificate was issued by Lets Encrypt! . Could there be a problem with that service? Service status shows normal & the last reported problem was high demand on 1 October, b

Swap two integers without using a temporary variable

Here's a clever little algorithm you can use to swap two integers without using a temporary variable. I rediscovered this tip , by Muhammad Saied, while reviewing my Delphi Tips micro-site . Dunno why, but I find this strangley pleasing! Assume we have two integers, A & B, both of which have values assigned. Swap their values like this:     A := A + B;     B := A - B;     A := A - B; To follow this through, let: A0 and B0 be the original values of A and B respectively A1 be the value of A after line 1 B2 be the value of B after line 2 A3 be the value of A after line 3 We have: After line 1:     A1 = A0 + B0 After line 2:     B2 = A1 - B0        = A0 + B0 - B0        = A0 After line 3:     A3 = A1 - B2        = A0 + B0 - B2        = A0 + B0 - A0        = B0 Et voilĂ . Very cunning Muhammad! EDIT: As  Dalija Prasnikar pointed out in the comments, because you're adding values, there's a danger of overflow errors. So what d'you reckon? Would you use that trick? For me,

Unit2NS gets a hotfix

Image
My little program to look up fully specified unit names given a base name has a memory leak in v0.1.0-beta. For details of the program, see this post or visit the Unit2NS web page web page. This HotFix fixes it. It's been released as v0.1.1-beta and is available in 32bit and 64bit versions from the Unit2NS Releases page on GitHub. O yeah, and this is the first thing I've edited and compiled with Delphi 11 Alexandria !