Thread View: comp.windows.ms.programmer
2 messages
2 total messages
Started by ddetws
Wed, 08 Apr 1992 21:37
Freeing USER data segment memory
Author: ddetws
Date: Wed, 08 Apr 1992 21:37
Date: Wed, 08 Apr 1992 21:37
24 lines
1550 bytes
1550 bytes
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? Any hints or advice would be greatly appreciated. Post or E-Mail will be fine. Thanks in advance, /**************************************************************************\ | Tommy Sager P. O. Box 1792 | | ddetws@Arco.com Odessa, Texas 79760 | | "Let's just assume it's Friday afternoon." - Unknown | \**************************************************************************/
Re: Freeing USER data segment memory
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads