A word of warning: because variables that reference objects are only pointers to the objects themselves, it is possible to set two variables that point to the same object. Because of this, COM uses reference counting to determine how many variables are still pointing to an object in memory. The object itself cannot be destroyed until the reference counter hits zero.