vishapoberon / compiler

vishap oberon compiler
http://oberon.vishap.am
GNU General Public License v3.0
186 stars 25 forks source link

Difference between programming on Oberon system and voc in Linux w.r.t. garbage collector. #25

Closed snayaksnayak closed 8 years ago

snayaksnayak commented 8 years ago

I think, while using voc to program, one can't take advantage of garbage collector. Am I mistaken?

norayr commented 8 years ago

libVishapOberon provides a garbage collector. It's sources are in SYSTEM.Mod. Memory get's free automatically.

There are ways to bypass the garbage collector. For example, define P = POINTER [1] TO PDesc; This won't be counted by GC.

If necessary, it's possible to implement your own Dispose() or Free() function, and use manual memory management. By default memory is managed by mark and sweep garbage collector.

snayaksnayak commented 8 years ago

That's good news, at least for me... I was mistaken.