[haiku-development] Re: BWeakReferenceable

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 22 Sep 2011 10:01:32 +0200 (MEST)

Hi Clemens,

clemens.zeidler@xxxxxxxxxxxxxx wrote:
> found Axel's nice WeakReferenceable implementation but had some problems 
> to understand how to use it. For example, the management of the 
> WeakPointer ref counting and the conversion into a WeakReference was a 
> bit confusing to me. I attached a new API which is more similar to 
> BReference and hopefully easier to use.

Consistency is important across the API, so please go ahead.
While you're at it, WeakPointer should get the 'B' prefix as well if this class 
is ever going to be made public. Or would it be possible to eliminate this 
class from the public eye?

Also I spotted a small coding style issue (line 113):
        BReference<Type>
        GetReference()

This should go into a single line in this style of declaration.

> Furthermore, BWeakReferenceable has a virtual destructor now, Axel is 
> that a problem in your net server code?

I would argue that it was a problem before but no longer is now.

Bye,
   Axel.


Other related posts: