// remove all contained objects. virtual void clear() { while(!objects.empty()) { #ifdef _DEBUG Target *obj=objects.begin()->second; delete obj; #else delete objects.begin()->second; #endif } assert(objects.empty()); }
~SoleStore() { // All objects must have gone from memory or they'll try and remove // themselves when they are deleted. assert (objects_.empty()); }