BIND 10 #2105: introduce node deleter of new RBTree

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


#2105: introduce node deleter of new RBTree
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  vorner
  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 vorner):

 Hello

 Replying to [comment:15 muks]:
 > Replying to [comment:13 vorner]:
 > > {{{#!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()` ?

 I don't know. I think that's just matter of personal preference.

 Replying to [comment:16 muks]:
 > Also `mem_sgmt` is not available in `DomainTreeNode`, so that'll be a
 problem in `setData()` if we want to destroy the old data. We'll have to
 pass it to `setData()`.

 Yes, of course, that would be needed too. But I think it is OK, because
 whoever calls setData, has the segment too, because they allocated the
 data.

 Replying to [comment:17 muks]:
 > Also merged `nodeFission()` changes from #2054.

 They are reviewed there, right? I don't need to review them again.

 > Let me know your opinion on the other points.

 Which points? About the segment ↑?

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


More information about the bind10-tickets mailing list