
Hey Bjorn, Excellent points! I'll make those changes :-) Thanks! - Taylor On Jun 22, 2013, at 1:16 AM, Bjorn Reese wrote:
On 06/17/2013 10:41 PM, Taylor Holliday wrote:
I like the idea.
Some minor comments:
In the Collect() function the sequence is a static local variable. You may consider making it a normal member variable (you have already declared the "collector" variable as static.)
Apropos, you may consider using boost::call_once instead of using a Meyers singleton, because the latter is not thread-safe.
In the mark phase you use an std::vector as a stack. It may be better to use std::stack.
In the sweep phase you collect a new set and then assign it to the old. You should probably use one of these instead:
_nodes.swap(newNodes);
or if you are going for a C++11 only solution:
_nodes = std::move(newNodes);
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost