Markus Gerwinski wrote:
But it's done in several languages -- e.g. for interfaces in Delphi. There you don't have an explicit store pointer, but a reference counter keeps track on every piece of memory; if the number of pointers referencing it decreases to 0, it is automatically disposed of. This requires exactly what you say: Searching for all references to a piece of memory, whenever a pointer is set away from it.
No, reference counting is not the same as keeping track of all references. You don't have to search the references (inefficiently), just change a counter.
Frank