GC, the simple solution
Frank Benoit
keinfarbton at nospam.xyz
Sun Jun 4 03:05:02 PDT 2006
Another garbage collector thread :)
The best garbage collector I can think about, is a reference counting
one. To implement this:
* Every object needs a reference counter field.
* Code using references, need to have code for incrementing/decrementing
the counters.
* Destructors are called immediatly if the counter goes zero.
What you get is a precise, incremental, realtime garbage collector.
* all logic behaviour is deterministic
* Member objects are still valid, while a destructor is called. => no
more dispose/close patterns
* implement games and realtime apps without worry about lags
* implement secure application without worry about GC attack by valid
refence data values.
* consume only the needed memory
* no more need for the auto object
More information about the Digitalmars-d
mailing list