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

Side by Side Diff: runtime/vm/code_observers.cc

Issue 25674009: Add framework for Dart_Terminate which will cleanup stuff on exit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « runtime/include/dart_api.h ('k') | runtime/vm/dart.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/code_observers.h" 5 #include "vm/code_observers.h"
6 6
7 #include "vm/os.h" 7 #include "vm/os.h"
8 8
9 namespace dart { 9 namespace dart {
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 return false; 44 return false;
45 } 45 }
46 46
47 47
48 void CodeObservers::DeleteAll() { 48 void CodeObservers::DeleteAll() {
49 for (intptr_t i = 0; i < observers_length_; i++) { 49 for (intptr_t i = 0; i < observers_length_; i++) {
50 delete observers_[i]; 50 delete observers_[i];
51 } 51 }
52 free(observers_); 52 free(observers_);
53 observers_length_ = 0;
54 observers_ = NULL;
53 } 55 }
54 56
55 57
56 void CodeObservers::InitOnce() { 58 void CodeObservers::InitOnce() {
57 OS::RegisterCodeObservers(); 59 OS::RegisterCodeObservers();
58 } 60 }
59 61
60 62
61 } // namespace dart 63 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698