Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4182347

Excessive use of Resouces under Win95

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1.7
    • client-libs
    • x86
    • windows_95



      Name: mf23781 Date: 10/19/98


      *Symptoms:
      The following program creates a Frame, and then adds 2000 panels to it.
      When I run it on Win95 using Sun/IBM's JDKs, I get an out of memory exception,
      and Resource Meter drops to 0% free (and gives me a warning about low system
      resources). Using jview, the Frame pops right up, and Resource Meter doesn't
      drop at all.

        
      *Test case
      =================================================================
      import java.awt.*;

      public class Example {
         public static void main(String args[]) {
            Frame F = new Frame("Memory Hog");
            F.setSize(800,600);
            F.setLayout(new CardLayout());

            int cnt=1;
            while (cnt++<2000) {
               Panel P = new Panel();
               F.add(P, "Junk");
            }

            F.show();
         }
      }
      =================================================================
      ======================================================================

            feckssunw Fred Ecks (Inactive)
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: