Re: [cp-patches] FYI: Add Enum.finalize()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 20, 2006 at 09:34:29AM +0100, Mark Wielaard wrote:
> Hi (moved to main list since I think this might be interesting for
> runtime hackers),
> 
> On Tue, 2006-12-19 at 00:37 +0000, Andrew John Hughes wrote:
> > This adds the finalize() method added to Enum
> > in 1.6.  Should fix a few JAPI errors...
> > 
> > Changelog:
> > 
> > 2006-12-19  Andrew John Hughes  <gnu_andrew@xxxxxxxxxxxxxx>
> > 
> > 	* java/lang/Enum.java:
> > 	(finalize()): Implemented.
> > [...]
> > +  /**
> > +   * Enumerations can not have finalization methods.
> > +   *
> > +   * @since 1.6
> > +   */
> > +  protected final void finalize()
> > +  {
> > +  }
> 
> Interesting. Even though Enums should never be initialized "by hand"
> this is something a garbage collector should be aware of. Do garbage
> collectors already handle empty finalize() methods as if there was no
> finalizer?

In CACAO we currently search for a finalizer method and add it if one is
found.  We don't check if there is actually code in it.

- twisti


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux