DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3472>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3472 java.lang.OutOfMemoryError while transforming XmlDocument ------- Additional Comments From [EMAIL PROTECTED] 2001-10-04 11:36 ------- One other (fairly minor) suggestion is to not declare the various variables - just use them inline. For example, try: InputSource outSource = null; try { Transformer transformer = template.newTransformer( ); Stream Source inSource = createSource ( inXmlDoc ); outSource = transformSource ( inSource , transformer ); } catch (Exception exp ) { exp.printStackTrace( ); } This avoids having to invoke the finally{} block, and ensures that any variables declared in the try{} block are deleted when leaving the block anyway (i.e. when the inSource object goes out of scope at the end of the try{}, the java compiler automatically knows it's ready for garbage collection). This technique can be applied to each of your methods.
