C
Christian Christmann
Hi,
a general question on the "new" operator.
Creating object dynamically using "new" might lead to problems,
when e.g. not sufficient memory is available and the object could
not be created on the heap. Shouldn't thus not all "new" usages
be included in a try{} block in order to enable handling of potential
problems?
However, their must be reasons why this is not done since lots of
people just use "new" without any corresponding exception
handling. Or is this just laziness?
Regards,
Chris
a general question on the "new" operator.
Creating object dynamically using "new" might lead to problems,
when e.g. not sufficient memory is available and the object could
not be created on the heap. Shouldn't thus not all "new" usages
be included in a try{} block in order to enable handling of potential
problems?
However, their must be reasons why this is not done since lots of
people just use "new" without any corresponding exception
handling. Or is this just laziness?
Regards,
Chris