diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2011-09-26 17:41:22 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2011-09-26 17:41:22 -0700 |
| commit | a88d9effbca3a228136dff82b4d47a8bf8276b64 (patch) | |
| tree | 5e0e75e67810fc5042772b89f79958e127202393 /src/rt/rust_cc.cpp | |
| parent | 5c973142df3661a23a085bfb655300c08ca19764 (diff) | |
| download | rust-a88d9effbca3a228136dff82b4d47a8bf8276b64.tar.gz rust-a88d9effbca3a228136dff82b4d47a8bf8276b64.zip | |
rt: Don't run arbitrary destructors on cycle collection; that's just broken.
Diffstat (limited to 'src/rt/rust_cc.cpp')
| -rw-r--r-- | src/rt/rust_cc.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/rt/rust_cc.cpp b/src/rt/rust_cc.cpp index 70bb5aab1ed..aebf472ab36 100644 --- a/src/rt/rust_cc.cpp +++ b/src/rt/rust_cc.cpp @@ -419,16 +419,9 @@ sweep(rust_task *task, const std::set<void *> &marked) { while (begin != end) { void *alloc = begin->first; if (marked.find(alloc) == marked.end()) { - const type_desc *tydesc = begin->second; - //DPRINT("object is part of a cycle: %p\n", alloc); - // Run the destructor. - // TODO: What if it fails? - if (tydesc->drop_glue) { - tydesc->drop_glue(NULL, task, (void *)tydesc, - tydesc->first_param, alloc); - } + // FIXME: Run the destructor, *if* it's a resource. task->free(alloc); } |
