VMWare Inc Interview Question for Member Technical Staffs
- 0of 0 votes
Assume that garbage collector is not there in place or you are implementing a garbage collector for C++. Write the design and sample code for garbage collector implementation- johnsvakel December 15, 2015 in India for Endpoint Computing
We have 3 classed and Class A, B, C. object of A uses object B and Object of B uses Object of C. How can we track the object existence and clear memory ?
Answer which I suggested : Write a tree (or Graph?)data structure (Garbage collector is a container class holds this data structure) where each node has multiple paths to reach. If any of the node is not having a path to reach then we can clean that memory. This way the garbage collection will work. Please suggest your design as well.
| Report Duplicate | Flag | PURGE
VMWare Inc Member Technical Staff Algorithm
Interview Type: In-Person
Open Chat in New Window