Actually further to this snippet:

const string Base::checksum (const string &p_data) const {
   string s;
   byte digest[SHA1::DIGESTSIZE];
   const uint length = p_data.size ();
   const byte *message = reinterpret_cast<const byte *> (p_data.data ());
 
   SHA1 ().CalculateDigest (digest, message, length);
   StringSource (digest, SHA1::DIGESTSIZE, true, new HexEncoder (new StringSink 
(s)));

   return s;
}

The memory allocated by new is deleted inside StringSource and HexEncoder 
right? Or should I
hold a reference to the pointers?

Cheers

Jim

-- 
James Vanns BSc (Hons) MCP
Linux Systems Administrator
Software Engineer (Linux / C & C++)
Canterbury Christ Church University College
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x24045370


Reply via email to