Ticket #3581: pthread_attr_destroy-libmythui.13589.txt

File pthread_attr_destroy-libmythui.13589.txt, 1.0 KB (added by Russell Bryant <russell@…>, 14 years ago)
Line 
1Index: libs/libmythui/mythmainwindow.cpp
2===================================================================
3--- libs/libmythui/mythmainwindow.cpp   (revision 13591)
4+++ libs/libmythui/mythmainwindow.cpp   (working copy)
5@@ -298,8 +298,8 @@
6     pthread_attr_t attr;
7     pthread_attr_init(&attr);
8     pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
9-
10     pthread_create(&lirc_tid, &attr, SpawnLirc, this);
11+    pthread_attr_destroy(&attr);
12 #endif
13 
14 #ifdef USE_JOYSTICK_MENU
15@@ -309,8 +309,8 @@
16     pthread_attr_t attr2;
17     pthread_attr_init(&attr2);
18     pthread_attr_setdetachstate(&attr2, PTHREAD_CREATE_DETACHED);
19-
20     pthread_create(&js_tid, &attr2, SpawnJoystickMenu, this);
21+    pthread_attr_destroy(&attr2);
22 #endif
23 
24 #ifdef USING_APPLEREMOTE
25@@ -319,8 +319,8 @@
26     pthread_attr_t attr3;
27     pthread_attr_init(&attr3);
28     pthread_attr_setdetachstate(&attr3, PTHREAD_CREATE_DETACHED);
29-
30     pthread_create(&appleremote_tid, &attr3, SpawnAppleRemote, this);
31+    pthread_attr_destroy(&attr3);
32 #endif
33 
34     d->keyContexts.setAutoDelete(true);