ObjFW  Check-in [d7d45d4b69]

Overview
Comment:Fix one more FIXME.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d7d45d4b69a0694bb4ddbd46edffad8c641d9178c336c7309b4ca103c7379d92
User & Date: js on 2009-11-13 21:02:17
Other Links: manifest | tags
Context
2009-11-13
21:07
Fix yet another FIXME. check-in: d3d1f36316 user: js tags: trunk
21:02
Fix one more FIXME. check-in: d7d45d4b69 user: js tags: trunk
18:53
Resolve more FIXMEs. check-in: f1637e9310 user: js tags: trunk
Changes

Modified src/OFAutoreleasePool.m from [c0583ef178] to [7523e6d739].

104
105
106
107
108
109
110












111
112
113
114
115
116


117
118
119
120
121
122
123
124
125
126
127

	return self;
}

- (void)dealloc
{
	[next dealloc];













	if (prev != nil)
		prev->next = nil;

	/* FIXME: Add exception? */
	of_tlskey_set(last_key, prev);


	if (of_tlskey_get(first_key) == self)
		of_tlskey_set(first_key, nil);

	[objects release];

	[super dealloc];
}

- addObject: (OFObject*)obj
{
	if (objects == nil)







>
>
>
>
>
>
>
>
>
>
>
>




|
|
>
>

|
|
<







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140

	return self;
}

- (void)dealloc
{
	[next dealloc];
	[objects release];

	/*
	 * If of_tlskey_set fails, this is a real problem. The best we can do
	 * is to not change the pool below the current pool and stop
	 * deallocation. This way, new objects will be added to the current
	 * pool, but released when the pool below gets released - and maybe
	 * the pool itself will be released as well then, because maybe
	 * of_tlskey_set will work this time.
	 */
	if (!of_tlskey_set(last_key, prev))
		return;

	if (prev != nil)
		prev->next = nil;

	/*
	 * If of_tlskey_set fails here, this is even worse, as this will
	 * definitely be a memory leak. But this should never happen anyway.
	 */
	if (of_tlskey_get(first_key) == self)
		if (!of_tlskey_set(first_key, nil))
			return;


	[super dealloc];
}

- addObject: (OFObject*)obj
{
	if (objects == nil)