Hello,
If in my code I do this:
and later on within the same block I do this:
Is this re-using the objects (myFile and docxml) or am I eating up more memory? I guess the bottom line is I am trying to re-use the objects myFile and docxml so as to reduce the memory requirements of my program.
Thanks for your input.
If in my code I do this:
Code:
File myFile = new File("myfile1.xml");
DocumentBuilderFactory dbfi = DocumentBuilderFactory.newInstance();
DocumentBuilder dbi = dbfi.newDocumentBuilder();
docxml = dbi.parse(File1);
and later on within the same block I do this:
Code:
myFile = new File("myfile2.xml");
DocumentBuilderFactory dbfi = DocumentBuilderFactory.newInstance();
DocumentBuilder dbi = dbfi.newDocumentBuilder();
docxml = dbi.parse(File2);
Is this re-using the objects (myFile and docxml) or am I eating up more memory? I guess the bottom line is I am trying to re-use the objects myFile and docxml so as to reduce the memory requirements of my program.
Thanks for your input.