The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Three Rules for Effective Exception Handling
Subject:  Not, reasonable application SHOULD catch it
Date:  2003-12-05 17:24:59
From:  krage
Response to: Not, reasonable application SHOULD catch it


Most time only allocation of a new object will result in a new OutOfMem. exception. You can still run any code which manipulates already existing objects. As of indeterministic nature of GC - yes, this is true, but there is an exception. If there is no memory available it WILL start collecting garbage BEFORE throwing another OutOfMem. exception.

Another thing is when you have catched it then the context in which it was thrown is already destroyed and the memory is actually available.

 Feed java.net RSS Feeds