The garbage collector is mentioned a lot in the literature on Oberon. The main ideas are that it is difficult to manage this correctly from a programmed point of view, so it is done automatically by the system. Most compilers emit a system field that links all the dynamic variables, and the garbage collector is able to know which of the fields are reachable by some globally anchored variable. The result is, when you are finished with a pointer, set it to NIL. No other memory management is required. The garbage collector, as a system supplied service, stays invisible to you. On Tue, Jun 29, 2010 at 3:19 PM, spir <denis.spir@gmail.com> wrote:
Hello,
When I resize the array actually holding a sequence's elements, the previous array is lost. In C or Pascal, I should free it, since it is dynamically allocated (in heap, certainly); but there is no such statement (free, release) in Oberon AFAIK. The report speak about GC, but this is in the informative part presenting some aspects of Oberon-the-system as an example environment for Oberon-the-language.
oo2c, the compiler I presently, indeed can be built to use a GC (and I did it). So, I should be safe. But this does not solve the issue in the general case. What should I do?
Thank you, Denis ________________________________
vit esse estrany ☣
spir.wikidot.com -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- -- Aubrey McIntosh, Ph.D. 1502 Devon Circle Austin TX 78723-1814 http://home.grandecom.net/~amcintosh/aubrey/Search/