We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
之前一直用1.67,最近升级了2.10,发现运行后unity里莫名多了很多gameobject,研究了下,发现新版生成的CLR绑定对构造函数也进行了绑定,如果这个类是有跨域继承的,并注册了跨域继承适配器,那么new对象的时候会new两次,先调用跨域继承适配器来生成对象,然后再调用CLR绑定函数new了一次对象,而且new的是原始类,并且这个new出来的对象被丢弃了,普通情况下就被垃圾回收了,但我用的类因为会创建gameobject,并且要手动dispose,结果就unity里挂了很多gameobject
The text was updated successfully, but these errors were encountered:
No branches or pull requests
之前一直用1.67,最近升级了2.10,发现运行后unity里莫名多了很多gameobject,研究了下,发现新版生成的CLR绑定对构造函数也进行了绑定,如果这个类是有跨域继承的,并注册了跨域继承适配器,那么new对象的时候会new两次,先调用跨域继承适配器来生成对象,然后再调用CLR绑定函数new了一次对象,而且new的是原始类,并且这个new出来的对象被丢弃了,普通情况下就被垃圾回收了,但我用的类因为会创建gameobject,并且要手动dispose,结果就unity里挂了很多gameobject
The text was updated successfully, but these errors were encountered: