This article deals with refactoring the code originally presented in A garbage collection framework for C++ in order to allow polymorphic types to be used. If you've not already done so you should read that article first. This article mostly deals with the process in which the code was refactored to illustrate to new programmers how code is maintained in real life situations. If all that you're interested in is using the gc_ptr smart pointer in your code you do not need to read this article. Just download the code from the link above to replace the implementation found in the previous article.