mORMot and Open Source friends
Check-in [c56be3152c]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:make sense to have an explicit exception here
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c56be3152c182113d21c24fe100b1aa360ed9da3
User & Date: G018869 2012-04-16 05:59:33
Context
2012-04-16
08:05
added TSQLRestServer.ServiceMethodByPassAuthentication method in order to allow by-pass of the RESTful authentication scheme for some methods (can be used e.g. to server some HTML content for a non SOA client check-in: 5b4e96bfbf user: G018869 tags: trunk
05:59
make sense to have an explicit exception here check-in: c56be3152c user: G018869 tags: trunk
05:38
added an explicit warning in case of wrong client code implementation (instead of an Assert): any used Interface shall be released before the Client check-in: 8071540884 user: G018869 tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SQLite3/SQLite3Commons.pas.

24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
    result := copy(result,2,length(result)-2) else
    result := '';
end;

destructor TServiceFactoryClient.Destroy;
begin
  if fSharedInstance<>nil then
  with TInterfacedObjectFake(fSharedInstance) do begin
    if fRefCount<>1 then begin
{$ifdef WITHLOG}
      SQLite3Log.Add.Log(sllWarning,
        '%.RefCount=%: please add I% := nil in code before releasing the client',
        [fSharedInstance,fRefCount,fInterfaceURI]);
{$endif}
      fRefCount := 1; // force release
    end;
    _Release; // bonne nuit les petits
  end;
  if fFakeStub<>nil then
    VirtualFree(fFakeStub,0,MEM_RELEASE);
  inherited;
end;


initialization






|
|
|
|
<
|
<
<
<
|
<







24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731

24732



24733

24734
24735
24736
24737
24738
24739
24740
    result := copy(result,2,length(result)-2) else
    result := '';
end;

destructor TServiceFactoryClient.Destroy;
begin
  if fSharedInstance<>nil then
  with TInterfacedObjectFake(fSharedInstance) do
    if fRefCount<>1 then
      raise EServiceException.CreateFmt(
        'RefCount=%d: shall release I%s interface (.. := nil) before Client.Free',

        [fRefCount,fInterfaceURI]) else



      _Release; // bonne nuit les petits

  if fFakeStub<>nil then
    VirtualFree(fFakeStub,0,MEM_RELEASE);
  inherited;
end;


initialization