We never drop our first ref on fileData. (All our ref counts start at one).
SkAutoTUnref<T> is almost always the right thing to use for refcounted types.
BUG=skia:2635
R=krajcevski@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/
310793003
SkString filename = SkOSPath::SkPathJoin(
INHERITED::gResourcePath.c_str(), "mandrill_512.pkm");
- SkData *fileData = SkData::NewFromFileName(filename.c_str());
+ SkAutoTUnref<SkData> fileData(SkData::NewFromFileName(filename.c_str()));
if (NULL == fileData) {
SkDebugf("Could not open the file. Did you forget to set the resourcePath?\n");
return;