Chromium Code Reviews| Index: crypto/openssl_util.h |
| diff --git a/crypto/openssl_util.h b/crypto/openssl_util.h |
| index b390fe7aea0fe9e6f37715a6fc1c7773f37e5d7d..e8483c9633ed577eabe24aecb9aab6182b4fbbe5 100644 |
| --- a/crypto/openssl_util.h |
| +++ b/crypto/openssl_util.h |
| @@ -11,7 +11,7 @@ |
| namespace crypto { |
| -// A helper class that takes care of destroying OpenSSL objects when it goes out |
| +// A helper class that takes care of destroying OpenSSL objects when they go out |
| // of scope. |
| template <typename T, void (*destructor)(T*)> |
| class ScopedOpenSSL { |
|
Ryan Sleevi
2013/02/04 22:53:27
As a TODO, we should move this towards using the n
|
| @@ -23,6 +23,11 @@ class ScopedOpenSSL { |
| } |
| T* get() const { return ptr_; } |
| + T* release() { |
| + T* ptr = ptr_; |
| + ptr_ = NULL; |
| + return ptr; |
| + } |
| void reset(T* ptr) { |
| if (ptr != ptr_) { |
| if (ptr_) (*destructor)(ptr_); |