lazutils: TAVLTree: changed default to be usable in threads

git-svn-id: trunk@56667 -
This commit is contained in:
mattias 2017-12-08 09:54:41 +00:00
parent ae0e9976a3
commit 41d64afed4

View File

@ -639,7 +639,6 @@ end;
constructor TAVLTree.Create(const OnCompareMethod: TListSortCompare);
begin
fNodeMgr:=LazNodeMemManager;
FOnCompare:=OnCompareMethod;
Init;
end;
@ -647,7 +646,6 @@ end;
constructor TAVLTree.CreateObjectCompare(
const OnCompareMethod: TObjectSortCompare);
begin
fNodeMgr:=LazNodeMemManager;
FOnObjectCompare:=OnCompareMethod;
Init;
end;
@ -1493,7 +1491,7 @@ function TAVLTreeNodeMemManager.NewNode: TAVLTreeNode;
begin
{$IFDEF CheckAVLTreeNodeManager}
if GetCurrentThreadId<>FThreadId then
raise Exception.Create('not thread safe!');
raise Exception.Create('TAVLTreeNodeMemManager: not thread safe!');
{$ENDIF}
if FFirstFree<>nil then begin
// take from free list