[fpc-devel] TAVLTree(avl_tree.pp) thread safety, fcl-xml(DOM) is also concerned.

Inoussa OUEDRAOGO inoussa12 at gmail.com
Thu Aug 7 00:00:36 CEST 2008


2008/8/6 Micha Nelissen <micha at neli.hopto.org>:
> Inoussa OUEDRAOGO wrote:
>> Hi,
>>
>> TAVLTree in avl_tree.pp is not thread safe due to the node
>> allocation and de-allocation done through the global
>> declared "NodeMemManager" variable. TAVLTreeNodeMemManager
>> implementation is cleary not thread safe, which btw IMHO
>> is a good thing ( for performance reason).
>
> Perhaps another option is to remove the NodeMemManager altogether and
> simply use GetMem/FreeMem (or New/Dispose)?

The second proposition contains a default TAVLTree that remove the node
mem manager and TAVLManagedTree that has a node mem manager for
people who do need it that way.

-- 
Inoussa O.



More information about the fpc-devel mailing list