in reply to Re^3: returning ref to static var vs. copying
in thread returning ref to static var vs. copying

... and 4. Sometimes, you just WANT to get/return a reference to a fresh copy, e.g. because you don't want the caller to damage the original array.

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
  • Comment on Re^4: returning ref to static var vs. copying