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>
This commit is contained in:
Ralf Habacker 2018-11-26 13:14:01 +01:00 committed by Alexandre Julliard
parent 797f93be65
commit 081a48ebab
2 changed files with 6 additions and 0 deletions

View File

@ -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;
}

View File

@ -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 );