New features and customer reported issues fixed in RAD Studio 10.4

De RAD Studio
Aller à : navigation, rechercher

Abstract: List of new features and customer reported issues fixed in RAD Studio 10.4 Alexandria.

RAD Studio™️ is the ultimate RAD environment for quickly building high-performance native cross-platform applications in Delphi and modern C++ using integrated toolchains loved by developers.

RAD Studio 10.4 Alexandria consists of new features, enhancements, and quality improvements.

Key RAD Studio 10.4 Features

  • Major Delphi Code Insight improvements
  • New Delphi language features
  • Unified Memory Management across all supported platforms for Delphi and C++
  • New VCL Components, Per-Control Styling, High DPI Styles and more
  • Enhanced Delphi multi-device platform support
  • Many database enhancements
  • Unified installer for online & offline installations
  • IDE usability and performance enhancements
  • New debugger for Windows 64-bit for C++
  • C++ toolchain performance and quality improvements
  • Expanded C++ libraries support
  • Enhanced CMake for C++ features and compatibility with other toolchains
  • Hundreds of quality and performance improvements

For a detailed list of new features, please visit the Nouveautés page.

Additional Quality Enhancements in RAD Studio 10.4

There are many significant quality enhancements in various areas of the product. Key additional (smaller) new features include those listed in the following sections.

App Tethering

  • App Tethering quality has been further improved following the work already done in RAD Studio 10.3.3.
  • There is now an option to set tethering timeouts.
  • Tethering resources provide a mechanism to know when communication is done.

Threading and Parallel Programming Library

  • There is a new AMinTimeToWait parameter in ForceQueue to delay the execution of code without creating a thread.

Delphi RTL

  • New TCustomIniFile methods WriteInt64 and ReadInt64.
  • New TGUID method IsEmpty.
  • JSON reading optimization: TJSONReader is now 50% faster.
  • The Items property of TJSONArray is now a default array property, allowing you to write myJArray[2] rather than myJArray.Items[2].
  • Optimized assigning a sorted StringList to another StringList.
  • We have removed some dependencies blocking certain console apps to run on WindowsServerCore.
  • The CopyFrom function of TStream used to have a fixed constant buffer for copying data (set to 60K). This can be very inefficient for copying large streams. The new default is 1MB, but the method has an additional parameter you can use to provide a specific buffer size depending on the copy operation you are doing (source and target streams). The new signature of the method is:
// class TStream
  function CopyFrom(const Source: TStream; Count: Int64 = 0;
  BufferSize: Integer = $100000): Int64;
  • RTTI performance improvements include:
    • TRttiMethod.Invoke is ~ 4 times faster
    • TVirtualInterface invocation is ~ 1.7 times faster
    • TRttiType.GetXxxx(AName) methods are ~ 10 times faster
    • For TValue several operations are faster
  • The QuickSort operation in System.Classes is now more efficient (that is, faster)
  • The TStringHelper.GetHashCode method has been updated not to uppercase the string before hashing it, so its result matches other internal operations like the TStringComparer class.

FreeAndNil

In 10.4 we updated the signature of the FreeAndNil procedure, to avoid its use with interface references and other unsupported data types. It is now declared to require a reference to a TObject:

procedure FreeAndNil(const [ref] Obj: TObject); inline;

This means that incorrect usage of FreeAndNil will now cause a compiler error. In the past, incorrect usage would not be caught, leading to difficult bugs. Note that although the parameter is declared as const, the by-reference variable is indeed modified.

A new, but ‘not as bad’, class of incorrect calling is possible with this declaration of FreeAndNil: the method can be called passing in properties or a method result, as well as cast expressions, a type’s implicit conversion to TObject, etc. The nil-ed value will then be the temporary variable in the expression.

FreeAndNil in C++

You will get a compiler error if the pointer type is not a descendant of TObject. That is, FreeAndNil is now typesafe. The error will take the form of a static_assert in a system header - although the error is raised in a system header, the assertion indicates an error in the code using FreeAndNil.

The new implementation will resolve incorrect usage of FreeAndNil in C++ as well. In the past, a direct translation of the Delphi idiom to pass the pointer to FreeAndNil could be a common mistake:

TObject* o = new TObject();
FreeAndNil(o); // Warning! Used to require FreeAndNil(&o)

In the past this would crash or cause unexpected behaviour, because FreeAndNil required a pointer to pointer (and its parameter was specified only as void*) but was unable to warn if the TObject* was passed in, rather than a pointer to that pointer.

Both classic and Clang compilers support two overloads of FreeAndNil, taking pointer-to-pointer and reference-to-pointer. Now, for that same previously incorrect line of code, that pointer will now be captured by reference and the correct pointer freed.

FireDAC SQLite driver offers both static and dynamic linkage

For SQLite, FireDAC adds the ability to choose static vs dynamic linkage of SQLite engine. To use the static linkage of SQLite engine it is required to add the unit "FireDAC.Phys.SQLiteWrapper.Stat" to the uses clause of one of the units of your project. Otherwise dynamical linkage will be chosen. There is a new property TFDPhysSQLiteDriverLink.EngineLinkage. When the value is slDefault or slStatic, then the "FireDAC.Phys.SQLiteWrapper.Stat" unit will be added at design-time to the unit hosting the component. If application defines the connection at run-time, then the "FireDAC.Phys.SQLiteWrapper.Stat" unit must be added manually.

Other Data Improvements

  • FireDAC improvements in the PostgreSQL driver with better support for complex types in TDataSetField and for `hstore` type.
  • FireDAC adds support for Firebird3 isc_info_sql_explain_plan in TIBStatement.
  • RAD Server TEMSDataSetResource now supports "total" value on get response for Sencha Ext JS VirtualStore. To activate the Sencha Ext JS VirtualStore format, include roVirtualStore into TEMSDataSetResource.Options.
  • For the DBImage component, there is a new DoLoadPicture virtual method and an OnLoadPicture event handler.

Several TFDEventAlerter component improvements and fixes.

Internet Related Improvements

  • The RestRequest has a way of cancelling an Asynchronous request.
  • (SOAP) Additional SendTimeout and UseDefaultCredentials properties and OnPostingData and OnHttpError events in THTTPReqResp class.
  • Ability to set client certificate for all SOAP HTTP clients (TStreamLoader)
  • TNetHTTPClient supports TLS 1.3.
  • The TAmazonRegion type (in Data.Cloud.AmazonAPI) has been changed from an enumerated value to a string value, so that additional regions can be added directly by developers without having to wait for an update to the component itself.
  • The spelling of method THTTPClient.CreateFormFromStrings has been corrected from THTTPClient.CreateFormFromStings. This would make any existing code using the method fail with an error. We deem this is not commonly used, so it should not break a lot of existing code.

Publicly reported bugs fixed in 10.4

RAD Studio 10.4 Alexandria release includes over 1000 quality and performance enhancements, including fixes for over 700 publicly reported bugs.

List of publicly reported bugs fixed in 10.4

See Also