This will always delete the object held by the auto_ptr<>. The necessary pattern is
```
if(theDetTypes.compare_exchange_strong(...) ) {
   //releases ownership
   ptr.release();
}