Article ID: 886385 - Last Review: February 24, 2012 - Revision: 4.0 Memory usage is high when you create several XmlSerializer objects in ASP.NET
SYMPTOMSIn Microsoft ASP.NET, the memory usage increases unexpectedly when you create several XmlSerializer objects. CAUSEThis problem occurs because an assembly that contains Microsoft intermediate language (MSIL) is created and
loaded into memory when you create an XmlSerializer object. You cannot unload the assembly without unloading the application domain that it resides in. Therefore, when you create several XmlSerializer objects, you may notice unexpectedly high memory usage. For example, if you use the following constructor to create several XmlSerializer objects, a new dynamic assembly is created every time: RESOLUTIONTo work around this problem of re-creating dynamic assemblies, use one of the following methods:
REFERENCESFor additional information about the XmlSerializer class and about the XmlSerializer class constructors, visit the following Microsoft Developer Network (MSDN) Web sites: http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer(vs.71).aspx
(http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer(vs.71).aspx)
http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer_members(vs.71).aspx
(http://msdn2.microsoft.com/en-us/library/system.xml.serialization.xmlserializer_members(vs.71).aspx)
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top
