[Mono-dev] DateTime/DateTimeFormatInfo patch to reduce Clone()
Paolo Molaro
lupus at ximian.com
Mon Dec 4 14:09:44 EST 2006
On 11/30/06 Atsushi Eno wrote:
> I noticed that many string[] properties in DateTimeFormatInfo are
> used directly in DateTime. They have to return Clone() which are
> not neccessary there.
If the arrays are exposed to the user, we should clone them, otherwise
the user can change the values in the arrays and break later code.
When used internally you could reference the array without cloning,
though.
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list