Module: wine Branch: master Commit: 081a48ebabc5c258aa580ff05d31f29c3fb3e08d URL: https://source.winehq.org/git/wine.git/?a=commit;h=081a48ebabc5c258aa580ff05...
Author: Ralf Habacker ralf.habacker@freenet.de Date: Mon Nov 26 13:14:01 2018 +0100
server: Release atoms when destroying a window class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46180 Signed-off-by: Ralf Habacker ralf.habacker@freenet.de Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/user32/tests/class.c | 4 ++++ server/class.c | 2 ++ 2 files changed, 6 insertions(+)
diff --git a/dlls/user32/tests/class.c b/dlls/user32/tests/class.c index d6910d9..2702fa0 100644 --- a/dlls/user32/tests/class.c +++ b/dlls/user32/tests/class.c @@ -115,6 +115,8 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) return; ok(classatom, "failed to register class\n");
+ ok(GetClipboardFormatNameW(classatom, str, ARRAY_SIZE(str)) != 0, "atom not found\n"); + ok(!RegisterClassW (&cls), "RegisterClass of the same class should fail for the second time\n");
@@ -230,6 +232,8 @@ static void ClassTest(HINSTANCE hInstance, BOOL global) ok(UnregisterClassW(className, hInstance), "UnregisterClass() failed\n");
+ ok(GetClipboardFormatNameW(classatom, str, ARRAY_SIZE(str)) == 0, + "atom still found\n"); return; }
diff --git a/server/class.c b/server/class.c index 403180d..b8240bd 100644 --- a/server/class.c +++ b/server/class.c @@ -76,6 +76,8 @@ static struct window_class *create_class( struct process *process, int extra_byt
static void destroy_class( struct window_class *class ) { + release_global_atom( NULL, class->atom ); + release_global_atom( NULL, class->base_atom ); list_remove( &class->entry ); release_object( class->process ); free( class );