BIND 10 #2105: introduce node deleter of new RBTree

BIND 10 Development do-not-reply at isc.org
Sat Jun 30 06:45:18 UTC 2012


#2105: introduce node deleter of new RBTree
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |                       Status:  new
            Priority:  medium        |                    Milestone:  Next-
           Component:  data source   |  Sprint-Proposed
           Sensitive:  0             |                     Keywords:
         Sub-Project:  DNS           |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |  scalable inmemory
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 We are not going to store node data in the new RBTree in the form
 of shared pointers, so the tree needs to take care of destroying
 node data when it destructs the entire tree.

 My suggestion is to make it a template parameter and call its
 operator() via the destructor.

 {{{#!cpp
 template <typename T, typename DeleterType>
 class RBTree : public boost::noncopyable {
 ...
 template <typename T, typename DeleterType>
 RBTree<T>::~RBTree() {
     DeleterType deleter;
     deleteHelper(root_, segment_, deleter);
     assert(node_count_ == 0);
 }
 }}}

 This depends on at least #2088 and #2090.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2105>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list