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

finalization enabled on instance memory allocation, not object construction

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.1, 1.2.0, 6
    • hotspot
    • None
    • generic, other, sparc
    • generic, solaris_2.5, solaris_9

      In a simple Java class (attached) the "finalize routine is only called if

      1. The object reference is set to null before program exit AND

      2. The mainline code sleeps for a few seconds before exiting



      also .. if these conditions are met, but if the constructor fails, later on, the finalize routine is STILL called!! (See example in attachment)

      ron.kleinman@Eng 1997-02-25

            coleenp Coleen Phillimore
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: