01: /*
02: * @(#)GCThread.java 1.2 00/02/02
03: *
04: * Copyright (c) 02/02/00 Sun Microsystems, Inc. All Rights Reserved.
05: */
06:
07: package com.sun.portal.util;
08:
09: public class GCThread implements Runnable {
10:
11: private Thread t = null;
12:
13: public GCThread() {
14: }
15:
16: public void start() {
17: if (t == null) {
18: t = new Thread(this );
19: t.start();
20: }
21: }
22:
23: public void run() {
24:
25: while (true) {
26: try {
27: Thread.sleep(60000);
28: } catch (InterruptedException e) {
29: }
30: System.gc();
31: }
32: }
33: }
|