BIND 10 #2105: introduce node deleter of new RBTree

BIND 10 Development do-not-reply at isc.org
Thu Aug 2 05:22:08 UTC 2012


#2105: introduce node deleter of new RBTree
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  muks
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:         |  Sprint-20120807
  medium                             |            Resolution:
                  Component:  data   |             Sensitive:  0
  source                             |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  4
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
  scalable inmemory                  |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by muks):

 Replying to [comment:13 vorner]:
 > Then there's no way the deleter could know which `mem_sgmt` it should
 use. It can't be a template argument, since that would make it fixed for
 all the trees. And, as the one and currently only goal of this deleter is
 to use the memory segment, I the code should be changed to:
 >
 > {{{#!c++
 > template <typename T, typename DT>
 > void
 > DomainTree<T, DT>::deleteAllNodes(util::MemorySegment& mem_sgmt) {
 >     const DT deleter(mem_sgmt); // <- This is where it knows now
 >     deleteHelper(mem_sgmt, root_.get(), deleter);
 >     root_ = NULL;
 > }
 > }}}

 Isn't it better to send it as an argument to `operator()` ?

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


More information about the bind10-tickets mailing list