You are not logged in.
Pages: 1
I got this assertion failure error in SQLite3Commons
destructor TServiceFactoryClient.Destroy;
begin
if fSharedInstance<>nil then begin
Assert(TInterfacedObjectFake(fSharedInstance).fRefCount=1); // gives assertion error
TInterfacedObjectFake(fSharedInstance)._Release; // bonne nuit les petits
end;
if fFakeStub<>nil then
VirtualFree(fFakeStub,0,MEM_RELEASE);
inherited;
end;
how can i avoid this?
Offline
On the client side of the code, the used interface is not freed.
Release the interface on the client side in your code BEFORE calling Client.Free:
MyClient.Services.Info(TypeInfo(IMyService)).Get(MyService);
...
// use MyService
...
MyService := nil; // shall be done BEFORE release client
MyClient.Free;
This is an issue in your implementation pattern.
See what the latest version of the documentation says about this, and http://synopse.info/forum/viewtopic.php?pid=3849#p3849
I've changed the assertion into an Exception.
See http://synopse.info/fossil/info/c56be3152c
You need to correct your code, to avoid any other possible trouble.
Offline
I changed my code.
Now it runs OK.
thank you
Offline
Pages: 1