The last point on our list of method and language criteria may at first appear to belong more properly to the next category implementation and environment. In fact it belongs to both. But the crucial requirements apply to the language; the rest is a matter of good engineering.Object oriented systems,even more than traditional programs tend to create many objects with sometimes complex interdependencies.
A policy leaving developers in charge of managing the associated memory, especially when it comes to reclaiming the space occupied by objects that are no longer needed, would harm both the efficiency of the development process, as it would complicate the software and occupy a considerable part of the developers time and the safety of the resulting systems as it raises the risk of improper recycling of memory areas.
In a good object oriented environment memory management will be automatic, under the control of the garbage collector, a component of the runtime system.The reason this is a language issue as much as an implementation requirement is that a language that has not been explicitly designed for automatic memory management will often render it impossible.
This is the case with languages where a pointer to an object ofa certain type may disguise itself as a pointer of another type or even as an integer making it impossible to write a safe garbage collector.The language should make safe automatic memory management possible and the implementation should provide an automatic memory manager taking care of garbage collection.
No comments:
Post a Comment