It was introduced by me as EmptyRecord, and later renamed to TOpaqueData, when commited to system.
It is a reference point to data that is not known or should not be known at compile time.
It can not leak by itself because a simple record is just a var and simple vars don't leak.
Its purpose is twofold (at least twofold):
1. It can be used to describe a reference to a datastructure from another language, e.g. in a shared library, where the library is responsible for its memory management, but the Pascal code needs such a reference to use the interface for that library to be complete.
An example is in Video editing libraries where the Pascal code needs to keep a reference to a frame and pass that reference back in other library calls.
2. In the way that Maciej - the major contributor to the generics.collections library in fpc - uses it: an empty container that needs a pointer allocation later, where the code is responsible to resolve it. That code is usually not exposed.
An example is the TEnumerableWithPointers.
So actually EmptyRecord is now already in system for a couple of years, but with another name.
This is documented here:
https://www.freepascal.org/docs-html/rtl/system/topaquedata.htmlhttps://www.freepascal.org/docs-html/rtl/system/popaquedata.html and
https://www.freepascal.org/docs-html/rtl/system/opaquepointer.htmlIt was discussed on the mailing list in the time that Maciej was writing the FreePascal port for the Delphi generics and later commited as a separate entity in system.
In summary it describes a datastructure which structure is not known.
In that sense it is simply a way of describing that the pointers to such construct describe the presence of a datastructure, not its contents. The content and its memory management needs to be managed elsewhere in the code.