Optimization · Tips & Tricks · Uncategorized

Experiments in Uniform Memory Management

We experiment with algorithms to make memory management in Delphi more consistent between desktop and mobile platforms. This eases debugging and finding memory leaks. We look into using object interfaces and semi-automatic memory management based on ownership. Along the way, we touch on using linked lists and Delphi’s messaging framework. Warning: this post is more… Continue reading Experiments in Uniform Memory Management

Optimization · Tips & Tricks · Uncategorized

SIMD Assembly Optimization

We get close to the metal as we demonstrate how you can incorporate assembly optimized SIMD routines into your Delphi apps. This can be done by using inline assembly code for Intel platforms, or by creating and linking a static library for ARM platforms. Nowadays, with optimizing and vectorizing compilers, few people still hand-write assembly… Continue reading SIMD Assembly Optimization

Libraries · Tips & Tricks · Uncategorized

Importing third-party Linux libraries on Delphi 10.2 Tokyo

This primer covers the basics of getting started using third-party libraries with the new Delphi 10.2 and Linux. Introduction If you are planning to use third-party Linux libraries on Delphi for Linux you may encounter some difficulties when you attempt to build and the linker attempts to find those libraries. Some basic Linux assistance with… Continue reading Importing third-party Linux libraries on Delphi 10.2 Tokyo

Foundation · Libraries · Tips & Tricks · Uncategorized

Build your own Error Reporter – Part 2: Android

In this second part on error reporting, we add support for Android. For that, we need to manually walk the call stack and configure the Delphi project to export symbols. In the previous article in this series, we shared some building blocks for implementing error reporting functionality on iOS. To recap, these blocks are: Intercepting… Continue reading Build your own Error Reporter – Part 2: Android

Foundation · Libraries · Tips & Tricks · Uncategorized

Build your own Error Reporter – Part 1: iOS

We share some building blocks for rolling your own error reporter in Delphi. From intercepting unhandled exceptions, to retrieving a stack trace to symbolicating the error report. This part focuses on iOS. In the next part, we handle Android, which does things a bit differently. We won’t cover Windows here, since there are already some… Continue reading Build your own Error Reporter – Part 1: iOS

Tips & Tricks · Uncategorized

Improve Android and iOS debug compilation speed

If you develop mobile apps with Delphi, you know it: compiling for Android and iOS is sloooooooooooooow, especially for debug builds. This little tip makes compiling Debug builds much faster… You may know this tip already, but if you don’t, you’ll be glad you do now. You would expect that Release builds take longer to… Continue reading Improve Android and iOS debug compilation speed

Foundation · Tips & Tricks · Uncategorized

Unit Testing Generic Types

So you created a generic class. Maybe a specialized generic collection, like a generic set. Professional as you are, you are going to need some unit tests for this class. But how do you test a class that can have so many variations depending on the type argument. You could write test cases for just… Continue reading Unit Testing Generic Types

Tips & Tricks · Uncategorized

Cross Platform Abstraction

Delphi supports quite a few platforms now and the FireMonkey framework abstracts a lot of the platform specific issues for us. But occasionally you want to use a platform-specific feature that FireMonkey does not support (yet). Or maybe you want to use it outside of the FireMonkey framework. For example, suppose you want to add… Continue reading Cross Platform Abstraction