Skip to content

Conversation

mio-19
Copy link
Contributor

@mio-19 mio-19 commented Apr 4, 2020

fix #8

@quark-zju
Copy link
Owner

quark-zju commented Apr 4, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Box<dyn T>

2 participants