•/**
• * This method does something
• * @param args an Object[]
containing the arguments needed for processing
• * @param handleOutOfMemoryError If true then
OutOfMemoryErrors are caught
• * in
this method then caching operations are initiated prior to retrying.
• * If false then OutOfMemoryErrors are caught
and thrown.
• */
•public Object[] methodToProcessl( Object[] args, boolean
handleOutOfMemoryError ) {
• try {
• return anotherMethodToProcess( args,
handleOutOfMemoryErrorFalse );
• } catch (
java.lang.OutOfMemoryError oome0 ) {
• if ( handleOutOfMemoryError )
{
• clearMemoryReserve();
• clearChunk( cacheChunk() );
• initMemoryReserve();
• return methodToProcessl(
args, handleOutOfMemoryError );
• } else {
• throw oome0;
• }
• }
• }