Article ID: 331956 - Last Review: May 21, 2007 - Revision: 4.9 Tablet PC Object Model Components Leak ResourcesThis article was previously published under Q331956 On This PageSYMPTOMS When you are using Tablet PC Platform components in a managed-code program, memory usage and the thread count may not
be reduced after the garbage collector runs, or after a long time has
elapsed. CAUSE This problem occurs if a Tablet PC object triggers an event,
but that object is not collected later. The hotfix that is described in this
article updates the Tablet PC .NET assembly (Microsoft.Ink.dll). RESOLUTIONTo resolve this problem, use of the following links to download and install either the Microsoft Windows XP Tablet PC Edition Software Development Kit (SDK) version 1.5 or the hotfix for versions 1.0 and 1.1 of the SDK. Tablet PC Platform SDK v1.5The following file is available for download from the Microsoft Download Center:Collapse this image ![]() Service pack informationTo resolve this problem, obtain the latest service pack for Microsoft Windows XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:322389
(http://support.microsoft.com/kb/322389/EN-US/
)
How to obtain the latest Windows XP service pack Hotfix informationHotfix for Versions 1.0 and 1.1 of the SDKA supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Windows XP service pack or use the Microsoft Windows XP Tablet PC Edition SDK 1.5 release that contains this fix.To resolve this problem immediately, download the fix by clicking the download link later in this article or contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
(http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The following file is available for download from the Microsoft Download Center:Collapse this image ![]() For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base: 119591
(http://support.microsoft.com/kb/119591/EN-US/
)
How to Obtain Microsoft Support Files from Online Services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.
The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name ---------------------------------------------------------- 27-Nov-2002 16:00 1.0.2201.2 379,464 Microsoft.Ink.dll MORE INFORMATIONTo resolve this problem, you must implement the hotfix and add the appropriate code as described in this article. Installing the HotfixTo install the hotfix, run the Setup program file that you obtained from Microsoft. The Setup program for this hotfix installs the following files on your computer:
The Setup program registers the updated Microsoft.Ink.dll assembly in the Global Assembly Cache. In Windows XP and Microsoft Windows 2000, this works only if the Microsoft .NET Framework is installed. This occurs automatically in Tablet PC Edition. Updating Your Assembly ReferenceFollow these steps to use the updated file in your program:
Verifying Your Assembly ReferenceAfter you have updated the assembly reference, verify that your program correctly references the new assembly. Recompile your program and then open it by using the Microsoft Intermediate Language Disassembler tool (ILDASM). This tool is included with Visual Studio .NET and is located in the %ProgramFiles%\Microsoft Visual Studio .NET\FrameworkSDK\Bin folder, where %ProgramFiles% is the environment variable that contains the path to the Program Files folder on your computer.Use the tool to verify in the Manifest section that the file version of the Microsoft.Ink.dll file matches the updated version number, which is 1.0.2201.2. Making Changes to Your ProgramThis update to the Tablet PC Platform assembly may affect how your program uses the following members of the Tablet PC Platform object model:
If your code listens for events on these objects, there are two changes that you must make in your managed-code program after you reference the new assembly. These changes are calling Dispose in client programs, and derived class event changes. Calling Dispose in Client ProgramsAfter you have updated the reference to the Tablet PC SDK .NET assembly, you must modify your program to call the Dispose method on all objects that use events when you are finished using them. If you do not call Dispose on objects that trigger events, that object will leak.Note The object leaks last only until your program is quit. During the shutdown process, the garbage collector releases all the objects, including those that trigger events. Any necessary finalizers on the objects are called. Derived Class Event ChangesMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites: Microsoft Certified Partners - https://partner.microsoft.com/global/30000104 (https://partner.microsoft.com/global/30000104) Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice (http://support.microsoft.com/gp/advisoryservice) For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms) If your program derives from InkCollector, InkPicture, or InkOverlay, no events are triggered unless you create a delegate. For example: Distributing Your ProgramAfter you have modified and tested your program, you can redistribute the updated assembly with your program by using the provided redistributable merge module (MstpcQ331956.msm). This merge module installs the updated assembly and registers it in the Global Assembly Cache on the computer on which it is installed. Your program can then use the updated assembly.STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Microsoft Windows XP Service Pack 2. | Article Translations
|
Back to the top

