Hi, i am learning the programming of StAX. I copied some code fragment from Internet, like:

try {
// First create a new XMLInputFactory
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
// Setup a new eventReader
InputStream in = new FileInputStream(configFile);
XMLEventReader eventReader = inputFactory.createXMLEventReader(in);
// Read the XML document
...
// When reach the end of xml doc,
// Closing what you have opened
if(event.isEndDocument()) {
//Close the reader to release memory
eventReader.close();
}

After parsing a xml, I want to release all the memory that used by StAX . Above code release the eventReader, what else need to do? how to release the inputStream and XMLInputFactory?

Thanks.