Everything about Resource acquisition is initialization
Approach to managing resources by tying them to object lifetime
Resource acquisition is initialization (RAII) is a programming idiom used in several object-oriented, statically typed programming languages to describe a particular language behavior. In RAII, holding a resource is a class invariant, and is tied to object lifetime. Resource allocation is done during object creation, by the constructor, while resource deallocation (release) is done during object destruction, by the destructor. In other words, resource acquisition must succeed for initialization to succeed. Thus, the resource is guaranteed to be held between when initialization finishes and finalization starts, and to be held only when the object is alive. Thus, if there are no object leaks, there are no resource leaks. Wikipedia →
🧭 Start here: a 6-step reading path
- Read the overview: Resource acquisition is initializationA 5-minute orientation
- Skim a recent paper: Indexing Cognitive Resource Usage for Acquisition of Initial Voice Therapy TargetsInfluential work since 2022
- Pick up a classic book: Department of EnergyThe most-reprinted book on the subject
- Read the landmark paper: Initial resource heterogeneity differences between family and non-family firms: Implications for resource acquisition and resource generationCited 24 times
- Go sideways: Destructor (computer programming)A closely related topic
- Go sideways: Resource management (computing)A closely related topic
📖 Definitions
No dictionary entry for this exact phrase.
🗂️ The subject at a glance
🏆 Landmark papers (most cited)
🆕 Influential since 2022
📚 Books worth reading
- 📕Department of EnergyUnited States. General Accounting Office · 1992
Department of EnergyVictor S. Rezendes · 1995
Essentials of educational psychologyJeanne Ellis Ormrod · 2006
Campbell biologyLisa A. Urry, Michael L. Cain · 2015
Sweating BulletsRobert Gaskins · 2012
Emerging Technologies for Information Systems, Computing, and ManagementW. Eric Wong · 2013
Uncertainty in artificial intelligence 3Laveen N. Kanal, Tod S. Levitt · 1989
Sweating BulletsRobert Gaskins · 2012
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
🔗 Related topics
- Destructor (computer programming) In object-oriented programming, a destructor (sometimes abbreviated dtor) is a method which is invoked mechanically just before the memory of the object…
- Resource management (computing) In computer programming, resource management refers to techniques for managing resources (components with limited availability). Computer programs may…
- Dispose pattern In object-oriented programming, the dispose pattern is a design pattern for resource management. In this pattern, a resource is held by an object, and…
- Finalizer In computer science, a finalizer or finalize method is a special method that performs finalization, generally some form of cleanup. A finalizer is executed…
- Comparison of Java and C++ Java and C++ are two prominent object-oriented programming languages. By many language popularity metrics, the two languages have dominated object-oriented…
- Object lifetime In object-oriented programming (OOP), object lifetime is the period of time between an object's creation and its destruction. In some programming contexts…
- New and delete (C++) In the C++ programming language, new and delete are a pair of language constructs that perform dynamic memory allocation, object construction and object…
- Singleton pattern In object-oriented programming, the singleton pattern is a software design pattern that restricts the instantiation of a class to a singular instance.…