Please, could someone explain to me what this peace of code
means (DSIGSignedInfo::createReference()):
{
DSIGReference * ref;
XSECnew(ref, DSIGReference(mp_env));
Janitor<DSIGReference> j_ref(ref);
...
// Add to the reference List
j_ref.release();
mp_referenceList->addReference(ref);
return ref;
}
What is Janitor::release() method for? It is not documented in
the source (Janitor.hpp) and I couldn't find info on Google. VC6
debugger reports that memory allocated on the second line (XSECnew())
was never released. If Janitor was used here for freeing "ref" pointer,
then why "ref" was returned (last line)?
Thank you,
Milan