I am using CComBSTR in below scenario,
void MyDlg::OnTimer()
{
......
CComBSTR statusString1 = ::SysAllocString(_T("Test"));
....
}
The timer will get executed with in each 5 seconds interval.
In the above case the meory is getting increased for each 5 seconds. As per my understanding the CComBSTR does the memory clean up when it goes out of scope. So the allocated memory has to be freed whenever the timer finishes. But its not.
I need to understand when the memory get freed when the CCOMBSTR is used.