rt: Don't run arbitrary destructors on cycle collection; that's just broken.
This commit is contained in:
parent
5c973142df
commit
a88d9effbc
1 changed files with 1 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue