|
From: <tre...@us...> - 2007-09-24 21:28:30
|
Revision: 439
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=439&view=rev
Author: trevorolio
Date: 2007-09-24 14:28:33 -0700 (Mon, 24 Sep 2007)
Log Message:
-----------
Added some memory hacks to ease Safari's lockups on applet deconstruction
Modified Paths:
--------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2007-09-24 21:26:54 UTC (rev 438)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2007-09-24 21:28:33 UTC (rev 439)
@@ -68,6 +68,8 @@
}
public void start() {
+ System.gc();
+ Runtime.getRuntime().runFinalization();
authCookie = getParameter("loginCookie");
if (authCookie == null) {
add(new ErrorPanel("Unfortunately, I can't authenticate. Perhaps you aren't logged in?"), BorderLayout.CENTER);
@@ -132,30 +134,40 @@
}
public void destroy() {
+ System.out.println("Destroying " + this + ": " + renderer + ", " + spaceClient);
if (renderer != null) {
renderer.stopRenderer();
}
if (spaceClient != null) {
spaceClient.cleanup();
}
+ System.gc();
+ Runtime.getRuntime().runFinalization();
+ System.out.println("Destroyed " + this + ": " + renderer + ", " + spaceClient);
}
public void stop() {
+ System.out.println("Stopping " + this + ": " + renderer + ", " + spaceClient);
if (renderer != null) {
renderer.stopRenderer();
}
if (spaceClient != null) {
spaceClient.cleanup();
}
+ renderer = null;
+ spaceClient = null;
+ System.gc();
+ Runtime.getRuntime().runFinalization();
+ System.out.println("Stopped " + this + ": " + renderer + ", " + spaceClient);
}
- public boolean completedInitialLoad(){
- if(renderer == null){
+ public boolean completedInitialLoad() {
+ if (renderer == null) {
return false;
}
return renderer.completedInitialLoad();
}
-
+
private float getFloatParameter(String name, float defaultValue) {
String stringValue = getParameter(name);
if (stringValue == null || stringValue.trim().length() == 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|