Article ID: 886385 - Last Review: May 25, 2007 - Revision: 2.4 Memory usage is high when you create several XmlSerializer objects in ASP.NETSYMPTOMSIn Microsoft ASP.NET, the memory usage increases unexpectedly when you create several XmlSerializer objects. Microsoft ASP.NET is included with the Microsoft .NET Framework 1.0 and the .NET Framework 1.1. 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)
| Article Translations
|

Back to the top
