I am getting memory leak with my code below. I just want to assign a new BSTR string to a _bstr_t variable but I'm getting a memory leak report in Rational Purfify from it. Is the Detatch method a wrong call? What is the appropriat way to do this? Thank you.
syUserContextPath is a _bstr_t variable and so is bstrDomainOnly
syUserContextPath = L"CN=SymarkGroup,CN=USERS," + bstrDomainOnly;