Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(537)

Side by Side Diff: src/doc/SkDocument.cpp

Issue 18461007: Fix two leaks & improve leak tracking (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/core/SkFontHost.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkDocument.h" 8 #include "SkDocument.h"
9 #include "SkStream.h" 9 #include "SkStream.h"
10 10
11 SK_DEFINE_INST_COUNT(SkDocument)
12
11 SkDocument::SkDocument(SkWStream* stream, void (*doneProc)(SkWStream*)) { 13 SkDocument::SkDocument(SkWStream* stream, void (*doneProc)(SkWStream*)) {
12 fStream = stream; // we do not own this object. 14 fStream = stream; // we do not own this object.
13 fDoneProc = doneProc; 15 fDoneProc = doneProc;
14 fState = kBetweenPages_State; 16 fState = kBetweenPages_State;
15 } 17 }
16 18
17 SkDocument::~SkDocument() { 19 SkDocument::~SkDocument() {
18 this->close(); 20 this->close();
19 } 21 }
20 22
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 fStream = NULL; 75 fStream = NULL;
74 return; 76 return;
75 case kInPage_State: 77 case kInPage_State:
76 this->endPage(); 78 this->endPage();
77 break; 79 break;
78 case kClosed_State: 80 case kClosed_State:
79 return; 81 return;
80 } 82 }
81 } 83 }
82 } 84 }
OLDNEW
« no previous file with comments | « src/core/SkFontHost.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698