Hi,
Purify is pointing memory leak in ole32.dll while returning a Variant with VT set to VT_RECORD as OUT parameter. I am using User Marshalling by generating proxy/stub dll from IDL. Can you suggest how to avoid this memory leak?
Struct defined in IDL:
{
BSTR m_sFirst;
BSTR m_sSecond;
VARIANT m_vChildStruct; //This member encapsulate a sub structure
SAFEARRAY __RPC_FAR * m_saArray;
}CustomINFO;
Encapsulation of struct in variant:
I am allocating the memory for the structs using CoTaskMemAlloc and encapsulating it in Variant as follows:
vV->vt = VT_RECORD;
vV->pvRecord = pStruct; //Pointer of sturct
vV->pRecInfo = pRI; //RecordInfo Interface
Thanks
Picaro De Vosio