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

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

Issue 9150031: Fix a couple of isolate-related memory leaks that show up a lot in valgrind output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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/lib/isolate.cc ('k') | no next file » | 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/bigint_store.h" 9 #include "vm/bigint_store.h"
10 #include "vm/code_index_table.h" 10 #include "vm/code_index_table.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 Isolate::~Isolate() { 74 Isolate::~Isolate() {
75 delete [] name_; 75 delete [] name_;
76 delete message_queue_; 76 delete message_queue_;
77 delete heap_; 77 delete heap_;
78 delete object_store_; 78 delete object_store_;
79 // Do not delete stack resources: top_resource_ and current_zone_. 79 // Do not delete stack resources: top_resource_ and current_zone_.
80 delete bigint_store_; 80 delete bigint_store_;
81 delete api_state_; 81 delete api_state_;
82 delete stub_code_; 82 delete stub_code_;
83 delete code_index_table_; 83 delete code_index_table_;
84 delete debugger_;
84 delete mutex_; 85 delete mutex_;
85 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate. 86 mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate.
86 } 87 }
87 88
88 89
89 static bool StandardPostMessageCallback(Dart_Isolate dart_isolate, 90 static bool StandardPostMessageCallback(Dart_Isolate dart_isolate,
90 Dart_Port dest_port, 91 Dart_Port dest_port,
91 Dart_Port reply_port, 92 Dart_Port reply_port,
92 Dart_Message dart_message) { 93 Dart_Message dart_message) {
93 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); 94 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate);
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 } 395 }
395 396
396 397
397 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor) { 398 void Isolate::VisitWeakPersistentHandles(HandleVisitor* visitor) {
398 if (api_state() != NULL) { 399 if (api_state() != NULL) {
399 api_state()->VisitWeakHandles(visitor); 400 api_state()->VisitWeakHandles(visitor);
400 } 401 }
401 } 402 }
402 403
403 } // namespace dart 404 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/isolate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698