Milan,

This time I can't explain it.

Can you add :

m_X509List.push_back(h);

immediately after the XSECnew(...)?

That will add it to the internal list of certificates, which will also ensure it gets deleted when the KeyInfo is deleted.

Cheers,
        Berin

Milan Tomic wrote:

Berin,

I'm still trying to discover source of memory leaks I'm expiriencing. Please, could you explain to me what this peace of code means:

DSIGKeyInfoX509::appendX509Certificate() {
...
... //more code here
...
X509Holder * h;
XSECnew(h, X509Holder);
h->mp_encodedX509 = b64Txt->getNodeValue();
h->mp_cryptoX509 = XSECPlatformUtils::g_cryptoProvider->X509();
char * charX509 = XMLString::transcode(h->mp_encodedX509);
ArrayJanitor<char> j_charX509(charX509);
h->mp_cryptoX509->loadX509Base64Bin(charX509, (unsigned int) strlen(charX509));
}


I can see that variable "h" is allocated, but I can't see where it was released. VC6 debugger reports memory leak here.

Thank you,
Milan

Reply via email to