Re: weak pointers, cbdata, refcounting

2005-08-26 Thread Henrik Nordstrom
On Mon, 22 Aug 2005, Alex Rousskov wrote: (*) For example, multiple inheritance does not seem to be supported by cbdata due to (void*) casting: Not only the cast. cbdata is really designed for simple structs and depends on being able to find the cbdata info from the object pointer. In

Re: weak pointers, cbdata, refcounting

2005-08-26 Thread Henrik Nordstrom
On Mon, 22 Aug 2005, Alex Rousskov wrote: That's good to know! Apparently, I do not use cbdata correctly because it does not seem to work for me. Could you please point me to the updated (with respect to classes) cbdata docs or notes? Perhaps I just need to add more #define-driven glue to

Re: weak pointers, cbdata, refcounting

2005-08-23 Thread Alex Rousskov
On Mon, 2005-08-22 at 18:50 -0400, Nick Lewycky wrote: 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, On the other hand, if we do not use Boost, our API would not need to change either :-). I did

weak pointers, cbdata, refcounting

2005-08-22 Thread Alex Rousskov
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 http://www.boost.org/libs/smart_ptr/smart_ptr.htm I cannot use existing RefCount.h

Re: weak pointers, cbdata, refcounting

2005-08-22 Thread Nick Lewycky
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

Re: weak pointers, cbdata, refcounting

2005-08-22 Thread Robert Collins
On Mon, 2005-08-22 at 18:50 -0400, Nick Lewycky wrote: ... 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

Re: weak pointers, cbdata, refcounting

2005-08-22 Thread Robert Collins
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

Re: weak pointers, cbdata, refcounting

2005-08-22 Thread Alex Rousskov
On Tue, 23 Aug 2005, Robert Collins wrote: 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,