I'm new member of the team and I read code below. I wonder do I need to call SafeArrayUnLock in the dctor? I tried to search on web without clear clue. So really appreciate your help!
Code:
class Trasaction
{
private:
CComSafeArray m_saCache;
public:
//ctor
Transaction(CComQIPtr<Reader>& pReader)
{
//This call need a SAFEARRAY** as its 3rd parameter
pReader->ReadData(start, size, &m_saCache);
SafeArrayLock(m_saCache.m_psa);
}
};