Given the following code:
byte[] data = ...;
{
data = null;
data = new byte[N];
}
Is the compiler allowed to discard the assignment of null, because it's
"dead" in language terms? My argument is that it isn't dead because it
allows the garbage collector to respond to pressure within the 'new' and
reuse the space, but in language terms, this presumably isn't defined,
and it would seem to be legal for the first assignment to be removed.
Thank you.
S.
--
You received this message because you are subscribed to the Google Groups
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.