Rene Gollent wrote: > > The base class version is guaranteed to only call delete, so that could be > > done directly as well. At any rate either the deletes in _RemoveBlock() or > > the one here needs to go. I'd vote for keeping the one here. > > That's not the case though ; _RemoveBlock() is destroying the hash > table entry structures, not the blocks themselves. That having been > said, I do need to change it so the entries don't keep references to > the blocks or they'll prevent the blocks from ever being removed. Sorry, sloppy reading on my part. I didn't expect there to be any extra objects. > > It would be nicer from a design point of view to avoid the direct knowledge > > of TeamMemoryBlockManager in TeamMemoryBlock by introducing a > > TeamMemoryBlockOwner interface with a single callback. > > i.e. something like: > > class TeamMemoryBlockOwner { > public: > void RemoveBlock(TeamMemoryBlock* block); > } > > ? Yep. CU, Ingo