aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/UtilsTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-16 14:58:06 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-16 14:58:06 +0000
commita22e2117e44efa4298dd0eb6df304a8166c8e9c3 (patch)
tree727738c19786a7c5caf1e09ccfe431b652d8b302 /tests/UtilsTest.cpp
parent1f47f4f7325971dd53991e2bb02da94fa7c6d962 (diff)
Extended Inst counting to find "unknown" leaked object (SkTMaskGamma)
Diffstat (limited to 'tests/UtilsTest.cpp')
-rw-r--r--tests/UtilsTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/UtilsTest.cpp b/tests/UtilsTest.cpp
index f1b1ea9139..1c2f870d1f 100644
--- a/tests/UtilsTest.cpp
+++ b/tests/UtilsTest.cpp
@@ -14,13 +14,19 @@
class RefClass : public SkRefCnt {
public:
+ SK_DECLARE_INST_COUNT(RefClass)
+
RefClass(int n) : fN(n) {}
int get() const { return fN; }
private:
int fN;
+
+ typedef SkRefCnt INHERITED;
};
+SK_DEFINE_INST_COUNT(RefClass)
+
static void test_refptr(skiatest::Reporter* reporter) {
RefClass* r0 = new RefClass(0);