[Mono-devel-list] Problem with System.Reflection.ConstructorInfo
malekith at pld-linux.org
Tue Mar 9 03:30:58 EST 2004
On Mon, Mar 08, 2004 at 08:24:36PM -0500, Joshua Tauberer wrote:
> While I was looking at this, two possible improvements to array creation
> came to mind. Do null elements of arrays need to be initialized? The
> CIL specs don't seem to say, which I guess means yes. (Though numeric
> elements are initialized to zero.)
The full quote is:
"Zero-based, one-dimensional arrays of numbers are created using a
metadata token referencing the appropriate value type (Int32, and so
on). Elements of the array are initialized to 0 of the appropriate
0 of reference type is null for me. However it doesn't seem clear if the
second sentence relates to the first.
Anyway, from the common sense point of view, null is the only sensible
thing to put in array. Otherwise you would end up having invalid
pointers there (breaking type safety as well as fooling GC).
: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: When in doubt, use brute force. -- Ken Thompson :: UL++++$ C++ E--- a?
More information about the Mono-devel-list