System.gc after outofmemory
authoramwaterhouse <Andrew Waterhouse>
Wed, 14 Sep 2005 11:20:57 +0000 (11:20 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 14 Sep 2005 11:20:57 +0000 (11:20 +0000)
src/jalview/gui/AlignViewport.java
src/jalview/gui/AlignmentPanel.java
src/jalview/gui/PCAPanel.java
src/jalview/ws/JPredClient.java
src/jalview/ws/MsaWSClient.java

index 1efb272..24d50d4 100755 (executable)
@@ -281,6 +281,7 @@ public class AlignViewport
       }catch(OutOfMemoryError error)\r
       {\r
         System.out.println("Out of memory calculating conservation.");\r
+        System.gc();\r
       }\r
     }\r
 \r
@@ -358,6 +359,7 @@ public class AlignViewport
       }catch(OutOfMemoryError error)\r
       {\r
         System.out.println("Out of memory calculating consensus.");\r
+        System.gc();\r
       }\r
 \r
     }\r
index 50c89f5..1358257 100755 (executable)
@@ -1012,6 +1012,7 @@ public class AlignmentPanel extends GAlignmentPanel
           System.out.println("########################\n"\r
                              +"OUT OF MEMORY "+pngFile+"\n"\r
                              +"########################");\r
+          System.gc();\r
         }\r
         catch (Exception ex)\r
         {\r
index d1005c2..7e893eb 100755 (executable)
@@ -140,6 +140,7 @@ public class PCAPanel extends GPCAPanel implements Runnable
                                               , "Out of memory",\r
                                               JOptionPane.WARNING_MESSAGE);\r
         System.out.println("PCAPanel: "+er);\r
+        System.gc();\r
 \r
       }\r
 \r
index 80a66c3..45d4bd1 100755 (executable)
@@ -259,6 +259,7 @@ public class JPredClient
                                                 , "Out of memory",\r
                                                 JOptionPane.WARNING_MESSAGE);\r
           System.out.println("JPredClient: "+er);\r
+          System.gc();\r
         }\r
       }\r
       if (result!=null)\r
index 0d4b2c1..0c30201 100755 (executable)
@@ -335,6 +335,7 @@ public class MsaWSClient
              +"\nSee help files for increasing Java Virtual Machine memory."\r
              ,"Out of memory", JOptionPane.WARNING_MESSAGE );\r
           System.out.println("MsaWSClient: "+er);\r
+          System.gc();\r
         }\r
       }\r
 \r