fleur
fleur copied to clipboard
Heap allocation weirdnesses
- allocate only once,
- no static
The usage of
staticvariables makes the BloomFilter code unnecessarily dangerous to use when multiple threads are used even if every thread just wants to allocate and use totally separate bloom filters. Actually it could even cause issues with two bloom filters created after each other since evenInitializejust returns a pointer to a single staticBloomFilter:o I can't come up with a reason why you'd consider making anything in therestatic.