Article ID: 886385 - Last Review: April 27, 2010 - Revision: 3.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 temporary assembly is created every time: RESOLUTIONTo work around this problem of re-creating 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
|





















Back to the top