Hello again. I have finished my Batik-powered game (you can play it at my website, sector91.com), but it tends to cause OutOfMemoryErrors. The game loads dozens of different SVG and SVGZ files, but for the most part they all exist as local variables within functions and therefore should be deallocated after they're not being used, so I don't know why this occurs.
So I watched the game's memory usage with Task Manager, and the memory usage seems to go up when each file is loaded and then NOT go back down when that file is no longer shown on the JSVGCanvas. (However, the same file never increments the memory more than once, making me think this is some sore of caching.) Why does this happen? As far as I know, there are no dangling references to the SVGDocument objects that I'm creating. Does Batik automatically cache SVG documents that it builds? And is there a way to disable this? If you want to know some specifics about my program, it preloads a bunch of SVG files into String variables when it starts, but this is never done more than once, so that's no reason for so much memory to be used. It creates SVG files with SAXSVGDocumentFactory using these strings instead of redownloading the files. The game does use double-buffered rendering, which I saw cited in another message as a cause of excessive memory usage, but I can't disable it without causing a lot of flickering around the game's animations. -- View this message in context: http://www.nabble.com/OutOfMemoryError%3A-Does-Batik-automatically-cache-SVG-files--tp14849191p14849191.html Sent from the Batik - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
