3 ms·
http://manishearth.github.io/blog/2016/08/18/gc-support-in-rust-api-design/ http://manishearth.github.io/blog/2016/08/18/gc-support-in-r... The reason Servo in
by Manishearth 10y ago
http://manishearth.github.io/blog/2016/08/18/gc-support-in-rust-api-design/ http://manishearth.github.io/blog/2016/08/18/gc-support-in-r...
The reason Servo in particular would like GC hooks is because JavaScript is GCd and we want to be able to pass around Spidermonkey-managed pointers safely. We have a framework in place that does this, but proper compiler support would be nice.
Servo doesn't need to worry about finalizers because our DOM structs never have nontrivial destructors (explicit Drop impls).
The blog post throws around some ideas for dealing with the finalized problem though.