[haiku-commits] Re: r42764 - haiku/trunk/src/add-ons/kernel/network/stack

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 23 Sep 2011 03:28:47 +0200

clemens.zeidler@xxxxxxxxxxxxxx wrote:
> Author: czeidler
> Date: 2011-09-23 00:46:14 +0200 (Fri, 23 Sep 2011)
> New Revision: 42764
> Changeset: https://dev.haiku-os.org/changeset/42764
> 
> Modified:
>  haiku/trunk/src/add-ons/kernel/network/stack/net_socket.cpp
> Log:
> Switch to BWeakReference class. Hope this does not break anything. Calling 
> virtual destructur on a struct 
> should work fine, right?

There is no difference between struct and class other than the default 
accessibility of base classes and members.

Anyway, I noticed that it is never checked whether the allocation the 
BWeakReferenceable constructor performs actually succeeds (it also uses the 
throwing new). I haven't checked whether that issue already existed before your 
change, but it's obviously a no-go for kernel code.

CU, Ingo

Other related posts: