Index: include/core/SkTLazy.h |
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h |
index 2147b6681fa601dff47b8554eeea58fc5c70fc1e..be00b5fcc654b8d0d6a7a86c333bf1a4660383d5 100644 |
--- a/include/core/SkTLazy.h |
+++ b/include/core/SkTLazy.h |
@@ -74,6 +74,13 @@ public: |
return fPtr; |
} |
+ void reset() { |
reed1
2014/02/24 21:19:52
/*
* Destroy the lazy object (if it was created
bsalomon
2014/02/27 16:31:16
Done.
|
+ if (this->isValid()) { |
+ fPtr->~T(); |
+ fPtr = NULL; |
+ } |
+ } |
+ |
/** |
* Returns true if a valid object has been initialized in the SkTLazy, |
* false otherwise. |