[bind10-dev] jelte status update

Jelte Jansen jelte at isc.org
Fri Feb 5 13:14:25 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/05/2010 12:48 PM, Shane Kerr wrote:
> 
>> once the exceptions stuff has been moved out of isc::dns i can start
>> using it (oh and in fact i want to make isc::Exception have a
>> std::string instead of a char *, or i want a second one;
>> isc::RuntimeException that does). Some of the exceptions are already
>> using isc::dns::Exception now, but that creates a dependency on libdns.a
>> which is not necessary.
> 
> One question about this... do std::string objects use heap memory? If
> so, do we need to worry about leaks from exceptions then? (I guess using
> a shared_ptr is the way to avoid leaks in that case?)
> 

we copy construct the string as the exception is created, and the copy
will be destroyed together with the exception, so there is no memory leak.

turns out the exception class already does this, it just didn't have the
constructor that takes a string

Jelte
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktsGbEACgkQ4nZCKsdOncXX5ACfQ5ToUwZEvTw4bEygO/5oUudC
2Y8AoLo/eEmGoKZtqhoXjvib1DzBw8Hg
=qoNc
-----END PGP SIGNATURE-----



More information about the bind10-dev mailing list