Guillaume
Guillaume

Reputation: 13138

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

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 ???

Upvotes: 4

Views: 1132

Answers (1)

HasaniH
HasaniH

Reputation: 8402

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."

Upvotes: 4

Related Questions