mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-07 09:29:25 +01:00
codetools: added flag DisableCTNodeExtMemManager
git-svn-id: trunk@28189 -
This commit is contained in:
parent
ffe59abaf7
commit
cbcf2a2d33
@ -36,6 +36,8 @@ interface
|
|||||||
|
|
||||||
{$I codetools.inc}
|
{$I codetools.inc}
|
||||||
|
|
||||||
|
{off $DEFINE DisableCTNodeExtMemManager}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF MEM_CHECK}
|
{$IFDEF MEM_CHECK}
|
||||||
MemCheck,
|
MemCheck,
|
||||||
@ -1076,6 +1078,7 @@ end;
|
|||||||
|
|
||||||
procedure TCodeTreeNodeExtMemManager.DisposeNode(ANode: TCodeTreeNodeExtension);
|
procedure TCodeTreeNodeExtMemManager.DisposeNode(ANode: TCodeTreeNodeExtension);
|
||||||
begin
|
begin
|
||||||
|
{$IFNDEF DisableCTNodeExtMemManager}
|
||||||
if (FFreeCount<FMinFree) or (FFreeCount<((FCount shr 3)*FMaxFreeRatio)) then
|
if (FFreeCount<FMinFree) or (FFreeCount<((FCount shr 3)*FMaxFreeRatio)) then
|
||||||
begin
|
begin
|
||||||
// add ANode to Free list
|
// add ANode to Free list
|
||||||
@ -1084,9 +1087,12 @@ begin
|
|||||||
TCodeTreeNodeExtension(FFirstFree):=ANode;
|
TCodeTreeNodeExtension(FFirstFree):=ANode;
|
||||||
inc(FFreeCount);
|
inc(FFreeCount);
|
||||||
end else begin
|
end else begin
|
||||||
|
{$ENDIF}
|
||||||
// free list full -> free the ANode
|
// free list full -> free the ANode
|
||||||
ANode.Free;
|
ANode.Free;
|
||||||
|
{$IFNDEF DisableCTNodeExtMemManager}
|
||||||
end;
|
end;
|
||||||
|
{$ENDIF}
|
||||||
dec(FCount);
|
dec(FCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1525,7 +1525,7 @@ begin
|
|||||||
if IsIdentChar[AProcCode[NamePos]] then
|
if IsIdentChar[AProcCode[NamePos]] then
|
||||||
s:=s+' ';
|
s:=s+' ';
|
||||||
Result:=copy(AProcCode,1,NamePos-1)+s
|
Result:=copy(AProcCode,1,NamePos-1)+s
|
||||||
+copy(AProcCode,NamePos,length(AProcCode)-NamePos+1)
|
+copy(AProcCode,NamePos,length(AProcCode)-NamePos+1);
|
||||||
end else begin
|
end else begin
|
||||||
// there is already a name
|
// there is already a name
|
||||||
if AClassName<>'' then begin
|
if AClassName<>'' then begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user