ObjFW  Diff

Differences From Artifact [d1dce164e0]:

To Artifact [919a81fa63]:


79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
}

- initWithObject: (id)obj
{
	Class c;

	self = [super init];
	object = obj;

#ifndef _WIN32
	if (pthread_create(&thread, NULL, call_main, self)) {
#else
	if ((thread =
	    CreateThread(NULL, 0, call_main, self, 0, NULL)) == NULL) {
#endif







|







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
}

- initWithObject: (id)obj
{
	Class c;

	self = [super init];
	object = [obj copy];

#ifndef _WIN32
	if (pthread_create(&thread, NULL, call_main, self)) {
#else
	if ((thread =
	    CreateThread(NULL, 0, call_main, self, 0, NULL)) == NULL) {
#endif
139
140
141
142
143
144
145

146
147
148
149
150
151
152
#else
	if (thread != INVALID_HANDLE_VALUE) {
		TerminateThread(thread, 1);
		CloseHandle(thread);
	}
#endif


	[super dealloc];
}
@end

@implementation OFTLSKey
+ tlsKeyWithDestructor: (void(*)(void*))destructor
{







>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#else
	if (thread != INVALID_HANDLE_VALUE) {
		TerminateThread(thread, 1);
		CloseHandle(thread);
	}
#endif

	[object release];
	[super dealloc];
}
@end

@implementation OFTLSKey
+ tlsKeyWithDestructor: (void(*)(void*))destructor
{