Microsoft Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: In-Person
I see, something like reference counting. Yes, that can be done in 30 minutes. I would argue it's not true garbage collection.
Take a look at the implementation of shared_ptr. It already does that.
Yes..The actual problem was how can keeping track of leakage of memory..I was asked to assume that I have new and delete operators already present and so I can use them..I was expected to write a class which has functions to allocate memory using new operator and a destructor to remove the memory when it has no references.. and a copy constructor also..
- Anonymous October 25, 2011