From: SourceForge.net <no...@so...> - 2012-11-20 21:39:21
|
The following forum message was posted by e-flat at http://sourceforge.net/projects/jung/forums/forum/252062/topic/6199818: Just do this: for (File file: files) { Graph g = createGraphFromFile(file); // do stuff with g; } That's it. Let Java do the garbage collection after the loop is complete. You don't need to do anything else. FYI, this is not really a JUNG-specific question; this is a question about how to handle resources in Java. You may want to look around the web for more general Java tutorials; the Java site's tutorial at least used to be pretty good. Joshua |