[haiku-development] Re: invalid BMessengers

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 07 Aug 2008 01:31:49 +0200

Ingo Weinhold wrote:
> To sum it up, I don't think allowing to pass invalid BHandler object 
> pointers around is anything we need or should support.

Ok. Part of my confusion was that I thought BLooper deletes all attached 
BHandlers, but that's not the case. So at least the pointer won't go stale. 
I think I can fix my problem by constructing a BMessenger and check the 
return value of SendMessage(). If that fails, I know I have to delete the 
BHandler myself. The problem is here also that I cannot lock the BLooper, 
or I will risk a deadlock.

Best regards,
-Stephan

Other related posts: