Resource management (computing): Difference between revisions

Content deleted Content added
m = RAII: typo
Line 109:
</source>
 
In case of a more complicated [[object graph]], such as multiple objects sharing a resource, or cycles between objects that hold resources, proper resource management can be quite complicated, and exactly the same issues arise as in object finalization (via destructors or finalizers).; for example, the [[lapsed listener problem]] can occur and cause resource leaks if using the
[[observer pattern]] (and observers hold resources). Various mechanisms exist to allow greater control of resource management. For example, in the [[Google Closure Library]], the <code>[https://closure-library.googlecode.com/git-history/docs/class_goog_Disposable.html goog.Disposable]</code> class provides a <code>registerDisposable<code> method to register other objects to be disposed with this object, together with various lower-level instance and class methods to manage disposal.
 
=== Structured programming ===