Re: weak pointers, cbdata, refcounting

From: Robert Collins <>
Date: Tue, 23 Aug 2005 12:12:18 +1000

On Mon, 2005-08-22 at 16:38 -0600, Alex Rousskov wrote:
> Hi there,
> 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
> I cannot use existing RefCount.h for weak pointing because the interface
> does not support "invalidation" of a pointer -- the RefCount pointer
> stays valid until nobody uses it.

CBData works fine with standard classes. I'm curious though why you need
a weak ref? Most weak ref uses I've seen are roughly a failure to use


GPG key available at: <>.

Received on Mon Aug 22 2005 - 20:11:59 MDT

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