Resource management (computing): Difference between revisions

Content deleted Content added
Complex relationships: examples, fix File
m = RAII: typo
Line 76:
Most common is to acquire a resource during object creation, and then explicitly release it via an instance method, commonly called <code>dispose</code>. This is analogous to traditional file management (acquire during <code>open</code>, release by explicit <code>close</code>), and is known as the [[dispose pattern]]. This is the basic approach used in several major modern object-oriented languages, including [[Java (programming language)|Java]], [[C Sharp (programming language)|C#]] and [[Python (programming language)|Python]], and these languages have additional constructs to automate resource management. However, even in these languages, more complex object relationships result in more complex resource management, as discussed below.
 
==== RAII ====
{{main|Resource Acquisition Is Initialization}}