Dear all,
Now I want to implement reference counter in C, for automatic garbage collection.
For example, now I have a struct x.
How to know, how many are there pointer are pointing to this struct? If I know, and the number of pointer is 0, I can free this struct.
Please give me an idea.
Any help are welcome.