Hi,

Kala B <[EMAIL PROTECTED]> writes:

> If the C# new operator fails to allocate memory, does it return null?
> ( and throw the OutOfMemoryException). What is the expected/defined
> behaviour ?

According to Section 14.5.10.1 of the standard, it throws an
OutOfMemoryException.  You can find it online in the MSDN C# Language
Specification (it's section 7.5.10.1 there though).

  
http://msdn.microsoft.com/library/en-us/csspec/html/vclrfcharpspec_7_5_10_1.asp

> Is a null check enough ? 

A null check is not necessary.

- Hari
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to