Skip to content

Commit

Permalink
Comments added, formatting improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvmorozov committed Sep 29, 2019
1 parent 1e544b2 commit 140d5b1
Show file tree
Hide file tree
Showing 2 changed files with 253 additions and 244 deletions.
12 changes: 6 additions & 6 deletions package/CBRCComponent.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
interface

uses Classes;


type
TCBRCComponent = class(TComponent)
{ Component Controlled By References Counter (CBRC).
The object is freed only when reference counter is equal to zero.
The object isn't freed automatically, the destructor must be called
The object is freed only when reference counter is equal to zero.
The object isn't freed automatically, the destructor must be called
as usual. In the case of cyclical references objects will be
undestructable. }
protected
Expand All @@ -41,9 +41,9 @@ procedure TCBRCComponent.Free;
begin
if Assigned(Self) then
begin
if RefCount = 0 then
if RefCount = 0 then
Destroy
else
else
IntControlled := True;
end;
end;
Expand All @@ -58,7 +58,7 @@ function TCBRCComponent._Release: Integer; stdcall;
begin
Dec(FRefCount);
Result := RefCount;
if IntControlled and (Result = 0) then
if IntControlled and (Result = 0) then
Free;
end;

Expand Down
Loading

0 comments on commit 140d5b1

Please sign in to comment.