Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-27606

mergeStats helpers for Shared<> objects should be based on a const reference, not a copy

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Not specified
    • Resolution: Fixed
    • None
    • 8.6.26
    • JLib
    • None

    Description

      template <class INTERFACE>
      void mergeStats(CRuntimeStatisticCollection & stats, Shared<INTERFACE> source, const StatisticsMapping & mapping) { mergeStats(stats, source.get(), mapping); }
      

      This is causing a generally harmless but inefficient copy ctor to be called, which caused a link and release to be called on the shared object.
      Should be changed to a const reference.

      Attachments

        Issue Links

          Activity

            People

              ghalliday Gavin Halliday
              jakesmith Jake Smith
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: