DNSKEY::DNSKEY(const std::string& dnskey_str) :
impl_(NULL)
{
+ // We use auto_ptr here because if there is an exception in this
+ // constructor, the destructor is not called and there could be a
+ // leak of the DNSKEYImpl that constructFromLexer() returns.
std::auto_ptr<DNSKEYImpl> impl_ptr(NULL);
try {
NSEC3::NSEC3(const std::string& nsec3_str) :
impl_(NULL)
{
+ // We use auto_ptr here because if there is an exception in this
+ // constructor, the destructor is not called and there could be a
+ // leak of the NSEC3Impl that constructFromLexer() returns.
std::auto_ptr<NSEC3Impl> impl_ptr(NULL);
try {
NSEC3PARAM::NSEC3PARAM(const std::string& nsec3param_str) :
impl_(NULL)
{
+ // We use auto_ptr here because if there is an exception in this
+ // constructor, the destructor is not called and there could be a
+ // leak of the NSEC3PARAMImpl that constructFromLexer() returns.
std::auto_ptr<NSEC3PARAMImpl> impl_ptr(NULL);
try {