Previous: Consolidated Disposal Mechanics, Up: Referable Objects [Index]
Consolidated disposal (or garbage collection) does incur all sorts of costs. One of them is that resource management is not exactly inconspicuous nor fully automated.
While consolidated disposal in aime implies that all resources are eventually freed, it does not imply that certain limits will not be hit before time. The aime programmer will have to consider the drawbacks of consolided disposal and select the appropriate strategies accordingly.
The topics requiring special consideration with regard to the time of resource deallocation include file operations. All opened files will be eventually closed, but those that are deferred to the consolidated disposal managers might not be before the system limit for the number of open files is hit. Explicit file closing should be considered more thoroughly when enabling consolidated disposal.
Some disposal managers, like the libaime ones, will attempt an immediate disposal if inexpensive enough. The effect is that the opened files associated with file objects will be prompted closed even when not explicitely closed, unless the file objects are referred by other objects (such as list containers) for which the reachability status cannot be easily determined.