Re: weak pointers, cbdata, refcounting

From: Nick Lewycky <nicholas@dont-contact.us>
Date: Mon, 22 Aug 2005 18:50:14 -0400

Alex Rousskov wrote:
> I need to implement what some call a "weak pointer". A weak pointer
> becomes null or otherwise invalid when the corresponding object goes
> away or is invalidated. For an example, please see
>
> http://www.boost.org/libs/smart_ptr/smart_ptr.htm

Wonderful! I was just thinking about replacing CBDATA, yesterday or so.

Could we not simply make Squid depend on Boost? Or copy the Boost smart
pointer library implementation into the Squid source? Boost's license is
very relaxed:

  http://www.boost.org/more/license_info.html

This would remove RefCount<> first, then hopefully CBDATA in the future.
 The nice thing about using Boost is that if the library is added to C++
in the (admittedly distant) future, our API would not need to change,
and our copy of the Boost implementation could be kept around for older
compilers.

Nick Lewycky
Received on Mon Aug 22 2005 - 16:50:28 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Aug 31 2005 - 12:00:06 MDT