Java language proposal #1 (revised)

The overhead of reference counting has led to a preference for mark-and-sweep garbage collection. But this has some obvious disadvantages as well. For example, creation of temporary objects chews up memory; this reduces performance due to having to search for unused objects during garbage collection. Although incremental garbage collection can spread the search cost evenly over time, this does not reduce the cost.

It is evident that both reference counting and mark-and-sweep have their place. Although it is conceivable that the JVM could dynamically choose between the two for any given class, this seems difficult to implement.

The Java language specification should allow the programmer to specify that a class is to be reference counted, by adding "counted" as a modifier to the class definition.

This requires a new keyword and syntax changes to the language. If one must avoid introducing a new keyword, "transient" could be used instead of "counted".

[1005 byte] By [SteveDuToronto] at [2007-9-26 10:17:32]
# 1
Cross Post! See: http://forum.java.sun.com/thread.jsp?thread=182632&forum=4&message=579404
thpreusser at 2007-7-1 22:22:30 > top of Java-index,Other Topics,Java Community Process (JCP) Program...