[haiku-commits] Re: r42080 - in haiku/trunk/src/apps/debugger: . model user_interface user_interface/gui user_interface/gui/inspector_window

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 10 Jun 2011 16:29:04 +0200

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

Other related posts: