Index: src/pdf/SkPDFResourceDict.cpp |
diff --git a/src/pdf/SkPDFResourceDict.cpp b/src/pdf/SkPDFResourceDict.cpp |
index ee44f4ed5c02373fec36d97eab630422f044e6af..0102b3c49a28160722afb1c8c4786b30af9e17a6 100644 |
--- a/src/pdf/SkPDFResourceDict.cpp |
+++ b/src/pdf/SkPDFResourceDict.cpp |
@@ -112,14 +112,15 @@ SkPDFObject* SkPDFResourceDict::insertResource( |
SkPDFDict* typeDict = fTypes[type]; |
if (NULL == typeDict) { |
SkAutoTUnref<SkPDFDict> newDict(SkNEW(SkPDFDict())); |
- SkPDFName* typeName = SkNEW_ARGS( |
- SkPDFName, (get_resource_type_name(type))); |
+ SkAutoTUnref<SkPDFName> typeName( |
+ SkNEW_ARGS(SkPDFName, (get_resource_type_name(type)))); |
insert(typeName, newDict); // ref counting handled here |
fTypes[type] = newDict; |
typeDict = newDict.get(); |
} |
- SkPDFName* keyName = SkNEW_ARGS(SkPDFName, (getResourceName(type, key))); |
+ SkAutoTUnref<SkPDFName> keyName( |
+ SkNEW_ARGS(SkPDFName, (getResourceName(type, key)))); |
typeDict->insert(keyName, value); |
return value; |
} |