BUG: Transforms Used in ExtCreateRegion Cause Leak

Last reviewed: July 19, 1996
Article ID: Q153808
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface included with:

        - Microsoft Windows NT, version 3.51
    

SYMPTOMS

Calling ExtCreateRegion with a transformation matrix in the XForm parameter causes a small leak in system resources.

This can be viewed by watching the Private Bytes reported by the Performance Monitor (perfmon.exe) for the CSRSS process. Each call to ExtCreateRegion results in a slight increase to the allocated private bytes for CSRSS that are not returned to the system, even when the application exits. Several thousand calls to ExtCreateRegion are necessary before the leak is evident in the Performance Monitor.

RESOLUTION

To work around the problem, do not call ExtCreateRegion with a transformation. Always call this function with a NULL parameter for XForm. Similar functionality can be achieved by creating the region without a transformation and then setting a World Transformation with the SetWorldTransform function prior to using the Region.

If the goal is a transformed region without altering World Transformations, the application will have to perform the necessary matrix calculations to transform region data prior to its creation.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 3.51
KBCategory: kbprg kbbuglist
KBSubcategory: GdiMisc




THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 19, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.