Multiple Assembly.Load(Byte[]), same instance or leak?

北战南征 提交于 2020-01-03 17:51:48

问题


What happens when I call Assembly.Load(Byte[]) multiple times with a Byte array containing the same assembly ?

Will I get the same instance of Assembly for each call ?

The same assembly loaded multiple times within the app domain ???


回答1:


You will get a new Assembly object with each call, read the documentation, there is a note near the end:

"Note that this method overload always creates a new Assembly object with its own mapping."



来源:https://stackoverflow.com/questions/1554404/multiple-assembly-loadbyte-same-instance-or-leak

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!