Â I have been using the picking tool with setShapeCylinderSegment (this returns infinit results but is capped). It works just fine for me (in terms of what it does) and it wasn't until just recently I noticed that it has been causing my program to spike the memory. I have looked through Google to see the problem and apparently it is caused a memory leak. I have tried to solve it by simply setting all the variables to null after they are used but this doesn't help. Is there something I can do to or a free software I can use to find the exact variable that is causing this problem and a way to fix it. Here is the exception I received:Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap spaceÂ at com.sun.j3d.utils.picking.PickResult.intersect(Unknown Source)Â at com.sun.j3d.utils.picking.PickResult.generateIntersections(Unknown Source)Â at com.sun.j3d.utils.picking.PickResult.numIntersections(Unknown Source)Â at com.sun.j3d.utils.picking.PickTool.pickGeomAllSortedIntersect(Unknown Source)Â at com.sun.j3d.utils.picking.PickTool.pickGeomClosestIntersect(Unknown Source)Â at com.sun.j3d.utils.picking.PickTool.pickClosest(Unknown Source)Â at KeyNavigatorApp.getLandHeight(KeyNavigatorApp.java:613)Â at KeyNavigatorApp.UpdateKeyPressed(KeyNavigatorApp.java:1243)Â at KeyNavigatorApp$6.actionPerformed(KeyNavigatorApp.java:1117)Â at javax.swing.Timer.fireActionPerformed(Timer.java:271)Â at javax.swing.Timer$DoPostEvent.run(Timer.java:201)Â at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)Â at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)Â at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)Â at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)Â at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)Â at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)Â at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)Â at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)Thanks in advanced,
Maybe you don't have a memory leak but a memory peak. Try starting the JVM with more memory by using -Xmx parameter at the startup. This way you might be able to avoid the "out of memory" error.
How much memory is your system running on?xboxrulz
|VIEW DESKTOP VERSION||REGISTER||GET FREE HOSTING|