I'm having problems with my smart ptr also. Its a COM smart ptr, and the definition is simple (some parts removed for the sake of brevity):
template<class T>
class omni_ptr
{
T* p;
public:
omni_ptr()
{
p = NULL;
}
omni_ptr(const omni_ptr<T>& np)
{
p = NULL;
set(np.p);
}
omni_ptr(T* np)
{
p = NULL;
set(np);
}
~omni_ptr()
{
static_cast<IUnknown*>((T*)0);
release();
}
void release()
{
if(p)
{
p->Release();
p = NULL;
}
}
void set(T* np)
{
release();
p = np;
if(p)
p->AddRef();
}
T* operator->() const
{
return p;
}
T*& operator=(T* np)
{
set(np);
return p;
}
T*& operator=(const omni_ptr<T>& np)
{
set(np.p);
return p;
}
operator T*()
{
return p;
}
};
Sometimes it shows just the IUnknown methods, sometimes it shows methods for some other template instantiation. Is it a bug?
Do I need to send my license info to get an answer? I already sent an email to Whole Tomato support and got no answer.
Strauss