ObjFW  Check-in [7ebc9b62e0]

Overview
Comment:Retain object passed to OFThread instead of copying.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7ebc9b62e0180895872522e13f98d44818c03b073867252c7050e18684d66e06
User & Date: js on 2010-02-01 16:29:17
Other Links: manifest | tags
Context
2010-02-01
17:11
Improve documentation for +[arrayWithCArray:]. check-in: 4133c5055d user: js tags: trunk
16:29
Retain object passed to OFThread instead of copying. check-in: 7ebc9b62e0 user: js tags: trunk
14:20
More secure way to unlock spinlocks. check-in: cb6e353487 user: js tags: trunk
Changes

Modified src/OFThread.m from [acb2745598] to [0239ec1e3d].

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- initWithObject: (OFObject <OFCopying>*)obj
{
	self = [super init];
	object = [obj copy];

	if (!of_thread_new(&thread, call_main, self)) {
		Class c = isa;
		[object release];
		[super dealloc];
		@throw [OFInitializationFailedException newWithClass: c];
	}







|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}

- initWithObject: (OFObject <OFCopying>*)obj
{
	self = [super init];
	object = [obj retain];

	if (!of_thread_new(&thread, call_main, self)) {
		Class c = isa;
		[object release];
		[super dealloc];
		@throw [OFInitializationFailedException newWithClass: c];
	}