Adding methods for the garbage collector