Application DataModule
An application datamodule is a datamodule which gets additional support by the uniGUI run-time:
it is registered with the uniGUI run-time during the application initialization
it is created at the beginning of each session, or on-demand (according to the property MainModule.ApplicationDataModuleOptions.CreateOnDemand)
if not released by the user (using Free), it is automatically released when closing the session

Small applications requiring additional datamodules (that is, more than the MainModule), will probably use the default (CreateOnDemand = False), but big applications will enjoy better memory management creating the datamodules on-demand (and releasing them as soon as possible).
This is the auto-generated code for an Application DataModule:
Notice how similar this code is to the Application Form.
If the parameter CreateOnDemand is changed to true, here's how a form will use the application datamodule.
The datamodule is explicitly released when destroying the form (that is, as soon as the form does not need it anymore). But there is no code linking the UniDBGrid to the datamodule. The DFM file shows the design-time link:
The link is also visible in the form designer:

The datasource was linked at design-time to the datamodule. There is no need to do it at run-time.
Running the application proves that it is indeed working without memory leaks.
