Thank for reply. Yes you right, pCppRefcount_ is allocated by my custom 'new', but please take a look at line
286
template <class T_CppObject> inline
RefPtr<T_CppObject>& RefPtr<T_CppObject>::operator=(const RefPtr<T_CppObject>& src)
{
RefPtr<T_CppObject> temp (src);
this->swap(temp);
return *this;
}
As I understand pCppRefcount_ and pCppObject_ will be swaped with values returned from create_cairo_context function.
It is really strange why pCppObject_ can be deleted, but pCppRefcount_ not.
Is it possible that your custom allocator has a bug?
This is well known nedmalloc allocator.