Line | |
---|
1 | #include <os2win.h>
|
---|
2 | #include <stats.h>
|
---|
3 |
|
---|
4 | #ifdef DEBUG
|
---|
5 |
|
---|
6 | static DWORD nrwindowdcsallocated = 0;
|
---|
7 | static DWORD nrcalls_GetDCEx = 0;
|
---|
8 | static DWORD nrcalls_ReleaseDC = 0;
|
---|
9 |
|
---|
10 | //******************************************************************************
|
---|
11 | //******************************************************************************
|
---|
12 | void STATS_GetDCEx(HWND hwnd, HDC hdc, HRGN hrgn, ULONG flags)
|
---|
13 | {
|
---|
14 | nrwindowdcsallocated++;
|
---|
15 | nrcalls_GetDCEx++;
|
---|
16 | }
|
---|
17 | //******************************************************************************
|
---|
18 | //******************************************************************************
|
---|
19 | void STATS_ReleaseDC(HWND hwnd, HDC hdc)
|
---|
20 | {
|
---|
21 | nrwindowdcsallocated--;
|
---|
22 | nrcalls_ReleaseDC++;
|
---|
23 | }
|
---|
24 | //******************************************************************************
|
---|
25 | //******************************************************************************
|
---|
26 | void STATS_DumpStatsUSER32()
|
---|
27 | {
|
---|
28 | dprintf(("************* USER32 STATISTICS BEGIN *****************"));
|
---|
29 | dprintf(("Total nr of GetDCEx calls %d", nrcalls_GetDCEx));
|
---|
30 | dprintf(("Total nr of ReleaseDC calls %d", nrcalls_ReleaseDC));
|
---|
31 | dprintf(("Leaked DCs: %d", nrwindowdcsallocated));
|
---|
32 | dprintf(("************* USER STATISTICS END *****************"));
|
---|
33 | }
|
---|
34 | //******************************************************************************
|
---|
35 | //******************************************************************************
|
---|
36 |
|
---|
37 |
|
---|
38 | #endif //DEBUG
|
---|
Note:
See
TracBrowser
for help on using the repository browser.