How to implement a garbage collector in C?
Anonymous
Have a mandatory init() for each object. Keep count of variables and increment on init(). Then implement retain() and release() to increment and decrement counts. Delete object from memory when count reaches 0.
Check out your Company Bowl for anonymous work chats.