Hi, I have an application using a class derived from TRODataSnapModule.
I am using Delphi Tokyo, with RO_VERSION = ‘9.5.111.1397’
In destroy method of my class, I call to inherited destroy (TRODataSnapModule.destroy), where we have this code:
destructor TRODataSnapModule.Destroy;
begin
FreeOrDisposeOf(fProviders);
FreeOrDisposeOf(fInternalRegisteredProviders);
inherited;
end;
When I follow my application with in debug mode, I can see that after execute TRODataSnapModule.Destroy, it executes the TRODataSnapModule.Notification() method with “Operation = opRemove”, where it calls to TPublishedProviders.UnlinkProvider where it crashes, because Providers was freed (obviously not in a total way) in TRODataSnapModule.Destroy.
TPublishedProviders.UnlinkProvider crashes whet it tries to do a reference to Count method of TPublishedProviders.
Some images:
I fixed this issue adding a boolean instance variable that is setted in TRUE in TRODataSnapModule.Destroy and is checked in TRODataSnapModule.Notification(), when “Operation=opRemove”, before to call TPublishedProviders.UnlinkProvider (I put an additional condition to the actual IF ( “if (AComponent is TCustomProvider) and Assigned(Providers)” )
I will appreciate any help you can give me.
Regards.
Gustavo