Posts

Unified Memory Management - Coming with 10.4 Beta

As announced on previous roadmaps, the 10.4 release of Delphi is planned to have unified memory management. That means retiring the ARC compiler on mobile platforms, which will now operate under the same good old manual memory management model that originated on Windows.

Unification is good. Completely different memory management models require slightly different code. That alone breaks the promise of a single code base for all platforms. In reality, if you need to target platforms with different memory management models you will find yourself coding under the requirements of manual memory management where ARC will only throw you some curveballs. Constrained ARC is bad ARC, it is not useful, it cannot unleash its full power.

On one side I am happy because of unification, on the other I am sad to see the ARC compiler go. It had great potential and was mostly brought down by unoptimized RTL/FMX code that was written for manual memory management. There is a whole lot of code that could b…

Self destructing object instance

Using reference counting classes always requires some caution. You have to pay attention to reference cycles, using interface reference for referencing such object instances, not calling FreeAndNil and more... it is quite a list...

But every once in a while, new ways of shooting yourself in the foot keep popping up... So here goes the story...

I have two reference counted classes that hold reference to each other instances. One of those references is marked as [weak] to prevent creating strong reference cycle.

type TFoo = class(TInterfacedObject) private [weak] FRef: IInterface; public constructor Create(const ARef: IInterface); end; TBar = class(TInterfacedObject) private FFoo: IInterface; public constructor Create; virtual; destructor Destroy; override; procedure AfterConstruction; override; end; constructor TFoo.Create(const ARef: IInterface); begin inheri…

Rio 10.3.3 Update

Image
RAD Studio 10.3.3 update is live.

Just like previous 10.3.2 update got big feature in macOS 64bit platform, 10.3.3 brings long awaited Android 64bit platform support.



Adding 64bit Android platform is pretty straightforward.

You need to add 64bit SDK - make sure it uses the same base paths as 32bit SDK, open your project and 64bit Android will be automatically added to the platform list.

You need to make sure that all deployed resources for 32bit platform are also included for 64bit platform and you are ready to go.

If you want to test application on the device, you have to make sure that your device actually has 64bit Android OS. Even some newer low end devices still use 32bit OS despite the fact they do have 64bit CPUs. If you are about to purchase new device, double check OS bitness.

If your device does not have 64bit OS and you run 64bit Delphi application on it, it will show message "64-bit OS device required".

Unfortunately, 64bit Android debugger has some issues with p…

Optimizing Layout Hierarchies

Here are the slides for my CodeRage 2019 session: Optimizing Layout Hierarchies in FireMonkey


CodeRage 2019 - Optimizing Layout Hierarchies in FireMonkey

You can find out more about this and register for watching at CodeRage 2019

Deleaker

Image
If you have memory problems you should eat more... actually, I have no clue what you should do then. But if you have Delphi memory problems then Deleaker by Softanics can certainly be of assistance.



Deleaker has integration with both Delphi (RAD Studio) and Visual Studio as well as standalone application. It can help you find various types of leaks in Windows applications - memory, GDI, handles in unmanaged and .NET applications.

It has extremely low learning curve and you can start hunting memory leaks immediatelly. Thourough documentation and tutorials make this process even easier. Basically, it offers plug and play experience, something that is not commonly seen in non trivial developer tools.

Hunting down memory leaks of any kind can be tedious and tiresome job, especially when leaks have gone out of control. One of the most usefull options that can help in pinpointing problems faster is Deleaker's ability to easily create memory snapshots while your program is running and co…

Bugs, where art thou?

As you all may already know, Embarcadero recently had some serious server issues. At the moment, most functionality has been restored, but not all of it.

Specifically, a number of bugs is missing from the public RAD Studio Quality Portal If you have reported bugs in the period from June 24 to July 31, you will no longer be able to see those bug reports. However, all those bugs are still in the internal bug tracking system and they are not lost. You don't have to report them again.

They may be brought back to the public JIRA, but when and if that will happen is unknown at the moment.

If they don't resurface in the next month or so, and you have some critical reports you need to track, then you can file those reports again.

Big small update Rio 10.3.2

Image
RAD Studio update 10.3.2 has just been released, packed with new features and improvements; some big, some small.


Big featuresDelphi macOS 64-bitC++17 for Windows 64-bitC++ LSP Code Insight ImprovementsDelphi Linux Client Application Support (recently released for 10.3.1, too) Smaller featuresRAD Server Wizards and Deployment ImprovementsEnhanced Firebase Android Support Enhancements and ImprovementsIDERuntime Library PerformanceVCL QualityiOSC++17 QualityFireMonkeyFireDAC & DatabaseWeb Clients You can find the full list with additional details at http://docwiki.embarcadero.com/RADStudio/Rio/en/10.3_Rio_-_Release_2

For Delphi developers targeting Windows, there are no big features to be thrilled about. But, 10.3.2 brings many smaller fixes and improvements making this update quite worthwhile. If nothing else, a faster IDE alone justifies updating sooner, rather than later.

But don't take my word for it... just go and see for yourself...
Coming up next For me, personally, the m…