Objects have a counter on how many there are, and when the counter reaches zero the object is destroyed. The objects should be properly destroyed when you call Erase, but not all of them get destroyed if there are references to them elsewhere (the internal counter is bigger than 1).