TCustomProvider.Destroythere's some code which assumes that
Owneris still assigned during destruction. This, however, is not the case if the provider is being destroyed implicitly because of ownership.
Typically, you put provider components directly on your remote data module in which case this is not a problem: it's unnecessary to call
UnregisterProvidersince the remote data module (
IAppserverimplementor which exposes the providers) itself is being destroyed.
However, if your remote data module is not the same object as the owner of your provider components (the owner only delegates the providers), you might encounter this problem, especially when the owner is released while the remote data module stays alive. In this case, the providers are not unregistered before they are freed and the remote data module keeps references to invalid pointers.