ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/FBActivityMonitor.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/FBActivityMonitor.pas (file contents):
Revision 55 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC

# Line 25 | Line 25
25   *
26   *)
27   unit FBActivityMonitor;
28 + {$IFDEF MSWINDOWS}
29 + {$DEFINE WINDOWS}
30 + {$ENDIF}
31  
32   {$IFDEF FPC}
33 < {$mode objfpc}{$H+}
33 > {$mode delphi}
34   {$interfaces COM}
35   {$ENDIF}
36  
# Line 47 | Line 50 | type
50  
51    {$IFDEF DEBUGINTERFACES}
52    TMonitoredObject = class(TInterfacedObject)
50  private
51    FObjectCount: integer; static;
53    public
54      constructor Create;
55      destructor Destroy; override;
# Line 152 | Line 153 | end;
153   { TMonitoredObject }
154  
155   {$IFDEF DEBUGINTERFACES}
156 + var
157 +  FObjectCount: integer;
158 +
159   constructor TMonitoredObject.Create;
160   begin
161    inherited Create;
# Line 336 | Line 340 | procedure TInterfaceOwner.ReleaseInterfa
340   var i: integer;
341   begin
342    for i := 0 to Length(FInterfaces) - 1 do
343 +  begin
344 +    {$IFNDEF FPC}
345 +    {With Delphi we need to explicitly null the object reference when it is
346 +     going to be disposed of. This is because Delphi does not drop the reference
347 +     count until after the containing object is released.}
348 +    if (FInterfaces[i] <> nil) and (FInterfaces[i].RefCount <= 2) then
349 +      FInterfaces[i] := nil;
350 +    {$ENDIF}
351      FInterfaceRefs[i] := nil;
352 +  end;
353   end;
354  
355   end.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines