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

(ref) I offer a tool for finalization via PhantomReference

    XMLWordPrintable

Details

    • x86
    • windows_xp

    Description

      A DESCRIPTION OF THE REQUEST :
      There is well-known technique allowing to schedule some operations at the moment, when some given object becomes a "garbage", without using "finalize()" method. This technique is the queue of phantom references. The benefits of such method are described in many paper, for example: http://www.devx.com/Java/Article/30192/0/page/3

      Unfortunately, it is not too simple task to correctly use phantom references for this goal. In particular, one of the most difficult issues is synchronization (that is not discussed at all in the paper referred above).

      I think the standard Java libraries should contain a convenient tool, as simple as "finalize()" method, allowing to schedule some finalization actions at the moment when the object becomes unreachable. It could be the standard alternative to overriding "finalize()".

      Attachments

        Issue Links

          Activity

            People

              mr Mark Reinhold
              ryeung Roger Yeung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: