Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Unload an assembly
1 replies. Latest Post by Yi-Lun Luo - MSFT on May 26, 2008.
(0)
artjom_b...
Member
0 points
2 Posts
05-23-2008 7:37 AM |
I have multiple big assemblys which are loaded by main interface on demand ( games, size up to 5MB, 100 -200 games ), I can easily load them, but I didn't find a way to unload. :( As far as I understand it could be solved if I create new AppDomain and load game into it. But unfourtinately I didn't find a way to create new AppDomain in silverlight, am I missing something or how can I do unloading of unnecessary assemplys ?
Yi-Lun L...
All-Star
25052 points
2,747 Posts
05-26-2008 1:18 AM |
Hello, there's no way to unload assembly in Silverlight. You can't even achieve that on desktop CLR. But you don't need to worry. The underlying operating system (be it Windows or Mac) is smart enough to handle the memory issues. If one assembly is not used for a period of time, OS will switch it to the virtual memory. Virtual memory is almost unlimited, so you don't need to worry. The inactive assemblies almost occupies no physical memory. For the reason why not supporting assembly unload, please refer to this article.