I have a code like-
void CSomeClass::Remove()
{
BSTR tempStr = NULL;
while(!m_list.IsEmpty()) //m_list is a CSomeClass member of type CList<BSTR, BSTR>
{
tempStr = m_list.RemoveHead(); //application crash here!!
if(NULL==tempStr)
continue;
}
SysFreeString(tempStr);
}
And I am not sure why the application got crash. Is it possible to initialize a BSTR to another BSTR using assignment operator? Can anyone help me in finding out why the application is crashing?