Permalink
Browse files

Cleanup JIT runtime data properly

  • Loading branch information...
dbussink committed Jan 2, 2013
1 parent eaaaa24 commit 053d25b9abd544b1cd88cb6ac7bc8f882bab6909
Showing with 7 additions and 4 deletions.
  1. +4 −0 vm/llvm/jit_runtime.cpp
  2. +3 −4 vm/shared_state.cpp
View
@@ -15,6 +15,10 @@ namespace rubinius {
namespace jit {
RuntimeDataHolder::~RuntimeDataHolder() {
+ for(std::list<RuntimeData*>::iterator i = runtime_data_.begin();
+ i != runtime_data_.end(); ++i) {
+ delete *i;
+ }
runtime_data_.clear();
}
View
@@ -84,11 +84,10 @@ namespace rubinius {
}
for(std::list<capi::GlobalHandle*>::iterator i = global_handle_locations_.begin();
- i != global_handle_locations_.end();
- ++i) {
- capi::GlobalHandle* global_handle = *i;
- delete global_handle;
+ i != global_handle_locations_.end(); ++i) {
+ delete *i;
}
+ global_handle_locations_.clear();
delete global_handles_;
delete tool_broker_;

0 comments on commit 053d25b

Please sign in to comment.