Greetings,
- "Root Pointer" is an alternative to the long unsolved problem of
garbage collectors which lasted for more than 70 years!
- Thanks to Paul A. Bristow for his help on the generation of the
documentation which is now available at the following link:
http://philippeb8.github.io/root_ptr/
(I apologize for the misplaced images in the rationale)
- The library itself can be found here:
https://github.com/philippeb8/root_ptr/
All examples and tests compile fine with BJAM with GCC and MSVC.
- Also here is a quick overview on the benchmarks:
Single threaded:
unique_ptr (new): 43.2705
unique_ptr (make_unique): 42.4111
shared_ptr (new): 68.9101
shared_ptr (make_shared): 46.6575
shared_ptr (allocate_shared_noinit): 31.2334
root_ptr (new): 30.3701
Multi threaded:
unique_ptr (new): 42.1397
unique_ptr (make_unique): 43.4631
shared_ptr (new): 76.4543
shared_ptr (make_shared): 76.6611
shared_ptr (allocate_shared_noinit): 81.9926
root_ptr (new): 66.3417
- An example of its usage can be seen here:
https://github.com/philippeb8/root_ptr/blob/master/example/t100_test1.cpp
We can see in the aforementioned link that outputting part of a complex
graph, cyclic or not, can be done in the following simple way:
cout << "Mind dump:" << endl;
cout << * t100 << endl;
cout << "Searching for: \"einstein\"" << endl;
if (node_ptr