Reading the new Connections article Who's Counting?, there appears to
be some coding errors in the IceInternal::Handle class on page 12.
The method
Handle& operator=(const Handle& h)
never calls __incRef() on h->_p, instead it calls __incRef() on _p and
then __decRef() on the original _p (now named ptr).
and
Handle& operator=(T* p)
refers to the h variable, which is not in scope in this method.
Regards,
Blair

Reply With Quote