-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
None
-
beta
-
x86
-
windows_nt
I ran a JDK build (essentially build 42 of Merlin) in debug mode, and
the following leaks were reported when running SwingSet2 under jdkx:
--------------------------
Debug Memory Manager Leaks
--------------------------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 99
size: 40 bytes
order: 111
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 72
-------
file: ../../../src/win32/native/sun/windows/awt_Component.cpp, line 4944
size: 68 bytes
order: 68
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 52
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 42
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 69
size: 12 bytes
order: 33
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 29
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 12
-------
file: ../../../src/win32/native/sun/windows/ddrawUtils.cpp, line 205
size: 24 bytes
order: 9
-------
I basically just played around with the swingset for a minute - resizing
the app.
I reported the leak in awt_Component.cpp under a different bugid.
The leak on line 336 is repeated more and more the longer I play with the
swingset (or other apps). It seems to be a repeated leak.
wsdo->surfaceLock = new CriticalSection(); // line 336
wsdo->transparent = FALSE;
}
JNIEXPORT Win32SDOps * JNICALL
Win32SurfaceData_GetOps(JNIEnv *env, jobject sData)
{
--------------
gc = new Win32GC(); // line 99
::GetClientRect(wsdo->window, &gc->bounds);
// Make window-relative from client-relative
::OffsetRect(&gc->bounds, wsdo->insets.left, wsdo->insets.top);
//Likewise, translate GDI calls from client-relative to window-relative
::OffsetViewportOrgEx(hDC, -wsdo->insets.left, -wsdo->insets.top, NULL);
gc->type = 0;
gc->clip = NULL;
gc->brush = NULL;
gc->pen = NULL;
------------
__inline ThreadGraphicsInfo *GetThreadGraphicsInfo(JNIEnv *env,
Win32SDOps *wsdo) {
if (threadInfoIndex == TLS_OUT_OF_INDEXES) {
threadInfoIndex = TlsAlloc();
}
// REMIND: handle error when creation fails
ThreadGraphicsInfo *info =
(ThreadGraphicsInfo*)TlsGetValue(threadInfoIndex);
if (info == NULL) {
info = new ThreadGraphicsInfo(); // line 69
----------
tmpDdInstance->instanceLock = new CriticalSection(); // line 205
// set global variable to this temp structure
ddInstance = tmpDdInstance;
DTRACE_PRINTLN1("DDCreateDDObject done, ddInstance = 0x%x\n", ddInstance);
return TRUE;
}
/**
* Synchronize graphics pipeline by calling Lock/Unlock on primary
* surface
*/
void DDSync()
{
the following leaks were reported when running SwingSet2 under jdkx:
--------------------------
Debug Memory Manager Leaks
--------------------------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 99
size: 40 bytes
order: 111
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 72
-------
file: ../../../src/win32/native/sun/windows/awt_Component.cpp, line 4944
size: 68 bytes
order: 68
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 52
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 42
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 69
size: 12 bytes
order: 33
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 29
-------
file: ../../../src/win32/native/sun/windows/Win32SurfaceData.cpp, line 336
size: 24 bytes
order: 12
-------
file: ../../../src/win32/native/sun/windows/ddrawUtils.cpp, line 205
size: 24 bytes
order: 9
-------
I basically just played around with the swingset for a minute - resizing
the app.
I reported the leak in awt_Component.cpp under a different bugid.
The leak on line 336 is repeated more and more the longer I play with the
swingset (or other apps). It seems to be a repeated leak.
wsdo->surfaceLock = new CriticalSection(); // line 336
wsdo->transparent = FALSE;
}
JNIEXPORT Win32SDOps * JNICALL
Win32SurfaceData_GetOps(JNIEnv *env, jobject sData)
{
--------------
gc = new Win32GC(); // line 99
::GetClientRect(wsdo->window, &gc->bounds);
// Make window-relative from client-relative
::OffsetRect(&gc->bounds, wsdo->insets.left, wsdo->insets.top);
//Likewise, translate GDI calls from client-relative to window-relative
::OffsetViewportOrgEx(hDC, -wsdo->insets.left, -wsdo->insets.top, NULL);
gc->type = 0;
gc->clip = NULL;
gc->brush = NULL;
gc->pen = NULL;
------------
__inline ThreadGraphicsInfo *GetThreadGraphicsInfo(JNIEnv *env,
Win32SDOps *wsdo) {
if (threadInfoIndex == TLS_OUT_OF_INDEXES) {
threadInfoIndex = TlsAlloc();
}
// REMIND: handle error when creation fails
ThreadGraphicsInfo *info =
(ThreadGraphicsInfo*)TlsGetValue(threadInfoIndex);
if (info == NULL) {
info = new ThreadGraphicsInfo(); // line 69
----------
tmpDdInstance->instanceLock = new CriticalSection(); // line 205
// set global variable to this temp structure
ddInstance = tmpDdInstance;
DTRACE_PRINTLN1("DDCreateDDObject done, ddInstance = 0x%x\n", ddInstance);
return TRUE;
}
/**
* Synchronize graphics pipeline by calling Lock/Unlock on primary
* surface
*/
void DDSync()
{