Article View: comp.windows.ms.programmer
Article #372Re: Freeing USER data segment memory
From: Greg Demichillie
Date: Tue, 14 Apr 1992 15:51
Date: Tue, 14 Apr 1992 15:51
30 lines
1681 bytes
1681 bytes
In article <1992Apr8.213738.24213@Arco.COM> ddetws@Arco.COM (ddetws) writes: >HELP!!! > >I'm working on a Windows app that does not free system resources properly. >The GDI segment is OK, but my USER segment is growing. It doesn't seem >to grow larger the same amount each time. I looked for any MakeProcInstance >calls without FreeProcInstance calls, but this doesn't seem to be the >problem. I only use one MakeProcInstance call, other than dialog boxes, >and save the pointer to a global variable. I FreeProcInstance when >processing the WM_DESTROY message. ( Could this be the problem? My >app sure doesn't have any trouble finding the function. ) By the way my >app loses 4 to 6K to the USER segment each time it is run and exited. >Does this sound like an application problem, or maybe a Windows (heaven >forbid!) problem? > The best way to track down leaking resources is to use the debug kernel of Windows 3.1 (included in the SDK.) When the debug kernel is running, Windows tags allocations in the USER and GDI heaps with information about the app the allocated them and then when the app exits it runs through the heap looking for objects allocated by that app and prints a list of them. -Greg -- Greg DeMichillie Software Design Engineer - Application Frameworks (AFX) gregde@microsoft.com
Technical Details
Message-ID:
<1992Apr14.155128.966@microsoft.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!microsoft!gregdeReferences:
<1992Apr8.213738.24213@Arco.COM>Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.ms.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!microsoft!gregde From: gregde@microsoft.com (Greg Demichillie) Subject: Re: Freeing USER data segment memory Message-ID: <1992Apr14.155128.966@microsoft.com> Date: 14 Apr 92 15:51:28 GMT Organization: Microsoft Corp. References: <1992Apr8.213738.24213@Arco.COM> Lines: 28