File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 7f9ed39040404c59131ba3818e1ca947fb23d282
2
+ refs/heads/master: 5747fe7a2c0df47da1e062e81988707d9209bb7e
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Original file line number Diff line number Diff line change @@ -96,12 +96,6 @@ cleanup_task(cleanup_args *args) {
96
96
bool threw_exception = args->threw_exception ;
97
97
rust_task *task = a->task ;
98
98
99
- cc::do_cc (task);
100
- annihilate_boxes (task);
101
- cc::do_final_cc (task);
102
-
103
- task->die ();
104
-
105
99
{
106
100
scoped_lock with (task->kill_lock );
107
101
if (task->killed && !threw_exception) {
@@ -110,6 +104,20 @@ cleanup_task(cleanup_args *args) {
110
104
}
111
105
}
112
106
107
+ // FIXME: For performance we should do the annihilator instead
108
+ // of the cycle collector even under normal termination, but
109
+ // since that would hide memory management errors (like not derefing
110
+ // boxes), it needs to be disableable in debug builds.
111
+ if (threw_exception) {
112
+ // FIXME: When the annihilator is more powerful and successfully
113
+ // runs resource destructors, etc. we can get rid of this cc
114
+ cc::do_cc (task);
115
+ annihilate_boxes (task);
116
+ }
117
+ cc::do_final_cc (task);
118
+
119
+ task->die ();
120
+
113
121
task->notify (!threw_exception);
114
122
115
123
if (threw_exception) {
You can’t perform that action at this time.
0 commit comments