Index: include/core/SkTLazy.h |
diff --git a/include/core/SkTLazy.h b/include/core/SkTLazy.h |
index 2147b6681fa601dff47b8554eeea58fc5c70fc1e..a291e22a137692226425776dc9efaafb860836bb 100644 |
--- a/include/core/SkTLazy.h |
+++ b/include/core/SkTLazy.h |
@@ -75,6 +75,16 @@ public: |
} |
/** |
+ * Destroy the lazy object (if it was created via init() or set()) |
+ */ |
+ void reset() { |
+ if (this->isValid()) { |
+ fPtr->~T(); |
+ fPtr = NULL; |
+ } |
+ } |
+ |
+ /** |
* Returns true if a valid object has been initialized in the SkTLazy, |
* false otherwise. |
*/ |