Systems programming with Modula-3
Systems programming with Modula-3
Guardians in a generation-based garbage collector
PLDI '93 Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation
The design and evolution of C++
The design and evolution of C++
Ropes: an alternative to strings
Software—Practice & Experience
Effective Java programming language guide
Effective Java programming language guide
The Java Language Specification
The Java Language Specification
Finalization in the Collector Interface
IWMM '92 Proceedings of the International Workshop on Memory Management
Finding and preventing run-time error handling mistakes
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Smarter garbage collection with simplifiers
Proceedings of the 2006 workshop on Memory system performance and correctness
Exceptional situations and program reliability
ACM Transactions on Programming Languages and Systems (TOPLAS)
The CLOSER: automating resource management in java
Proceedings of the 7th international symposium on Memory management
Garbage collection in the next C++ standard
Proceedings of the 2009 international symposium on Memory management
Schedulability analysis for Java finalizers
Proceedings of the 8th International Workshop on Java Technologies for Real-Time and Embedded Systems
Exception-Handling bugs in java and a language extension to avoid them
Advanced Topics in Exception Handling Techniques
ShadowVM: robust and comprehensive dynamic program analysis for the java platform
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Hi-index | 0.00 |
We compare two different facilities for running cleanup actions for objects that are about to reach the end of their life.Destructors, such as we find in C++, are invoked synchronously when an object goes out of scope. They make it easier to implement cleanup actions for objects of well-known lifetime, especially in the presence of exceptions.Languages like Java[8], Modula-3[12], and C\#[6] provide a different kind of "finalization" facility: Cleanup methods may be run when the garbage collector discovers a heap object to be otherwise inaccessible. Unlike C++ destructors, such methods run in a separate thread at some much less well-defined time.Languages like Java[8], Modula-3[12], and C\#[6] provide a different kind of "finalization" facility: Cleanup methods may be run when the garbage collector discovers a heap object to be otherwise inaccessible. Unlike C++ destructors, such methods run in a separate thread at some much less well-defined time.We argue that these are fundamentally different, and potentially complementary, language facilities. We also try to resolve some common misunderstandings about finalization in the process. In particular: The asynchronous nature of finalizers is not just an accident of implementation or a shortcoming of tracing collectors; it is necessary for correctness of client code, fundamentally affects how finalizers must be written, and how finalization facilities should be presented to the user. An object may legitimately be finalized while one of its methods are still running. This should and can be addressed by the language specification amd client code.