gcmodule
gcmodule copied to clipboard
Box<dyn _>
fix https://github.com/quark-zju/gcmodule/issues/8
This removes an optimization. The old code will not track types like Box<T> where T is known to be untracked. That means Cc<Box<T>> won't be inserted to the linked list and Cc<Box<T>> takes less space in memory.
Could you use the customize type instead? That is, define struct MyBox(Box<dyn MyTrait>) and implement Trace on MyBox. That would preserve the optimization and makes Cc<MyBox> compile.