Microsoft KB Archive/942443

= You may encounter a memory leak, and a System.ComponentModel.Win32Exception exception may occur if you create several hundred XML Paper Specifications (XPS) in a Windows Presentation Foundation application =

Article ID: 942443

Article Last Modified on 11/14/2007

-

APPLIES TO


 * Microsoft .NET Framework 3.0

-



SYMPTOMS
If you create several hundred XML Paper Specifications (XPS) in one batch in a Microsoft Windows Presentation Foundation application, you may encounter a memory leak in the event handler. Additionally, a System.ComponentModel.Win32Exception exception may occur.



WORKAROUND
To work around this problem, preload the PresentationCore.dll file or the PresentationFramework.dll file in the primary application domain. Preload the file before the secondary application domain runs any Windows Presentation Foundation code. This operation adds the natively generated images into memory. Additionally, this operation prevents the problem.

Keywords: kbexpertiseadvanced kbtshoot kbprb KB942443

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.