FNC component in a dll prevents app from closing correctly

I finally have time to investigate the problem further. I really want to use the FNC components in my projects. I already described the problem in a previous ticket (April 2025).

I dynamically integrate a DLL into my main VCL form. This DLL provides an exported function that creates an interface. The interface creates a form on which an FNC component is located (TTMSFNCMemo, for example).

This are the steps:
I create the interface using the exported function of the dll, and the interface then creates and displays the form. Everything seems fine. Then I do something on/with the form (e.g. clicking a button) and then I close the form and exit the application. When I exit the application (mainform.formdestroy), I release the form first, followed by setting the interface to nil.

The main application window disappears, but when I check the Task Manager, the application is still running - and remains so. Without a FNC component on the form, the app closes perfectly normal this way.

If needed I can provide a very small examle app with the dll.

Is there a way to correctly use FNC components on a dll-form?

Kind regards
Harald

Sorry for the interruption.

It seems I released the form twice. I passed the main form as the owner of the dll-form and then released it again in the destructor of the interface object. However, when I release the owner, the form is already released. :-(
In the demo-project this was obvious - now I'm searching my original and more complex code.
Regards
Harald

1 Like

Thanks for the additional feedback