BIND 10 #1601: pass reference instead of shared pointer within AuthSrv

BIND 10 Development do-not-reply at isc.org
Tue Jan 24 07:28:47 UTC 2012


#1601: pass reference instead of shared pointer within AuthSrv
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:
  jinmei                             |                Status:  new
                       Type:  task   |             Milestone:  Next-Sprint-
                   Priority:  major  |  Proposed
                  Component:         |            Resolution:
  b10-auth                           |             Sensitive:  0
                   Keywords:         |           Sub-Project:  DNS
            Defect Severity:  N/A    |  Estimated Difficulty:  0
Feature Depending on Ticket:  auth   |           Total Hours:  0
  performance                        |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:1 stephen]:
 > If the code currently uses shared pointers, it is less of a change to
 pass a reference to the pointer through - just add an ampersand to the
 argument type in the method signature.  (I think we should do this
 everywhere - although we've discussed this in the past.) However, it is
 probably clearer to dereference the pointer and pass the reference to the
 object through to the internal method.

 Yes, we've discussed this before and I was not convinced about the
 idea: http://bind10.isc.org/ticket/1305#comment:9
 (I remembered the discussion, and that's why I explicitly noted that
 this was "not a reference to the shared pointer").

 I'd certainly be against about starting relying on 'reference to
 shared pointers' for performance improvement purposes before
 completing more organizational fixes and performing profiling based on
 the organizationally optimized version.

 The case this ticket mentions is certainly something we can really
 avoid using shared pointers in the first place, and the proposal of
 this ticket is to do such cleanup (which is, IMO, semantically more
 correct without any cost).

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


More information about the bind10-tickets mailing list