ObjFW  Diff

Differences From Artifact [0e0d5e7d64]:

To Artifact [82173abc64]:


85
86
87
88
89
90
91









92
93
94
95
96
97
98
	listobj = [pool_list append: self];

	return self;
}

- free
{









	[[OFThread objectForTLSKey: pool_list_key] remove: listobj];

	return [super free];
}

- addToPool: (OFObject*)obj
{







>
>
>
>
>
>
>
>
>







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
	listobj = [pool_list append: self];

	return self;
}

- free
{
	/*
	 * FIXME:
	 * Maybe we should get the objects ourself, release them and then
	 * release the pool without calling its release method? This way,
	 * there wouldn't be a recursion.
	 */
	if (listobj->next != NULL)
		[listobj->next->object release];

	[[OFThread objectForTLSKey: pool_list_key] remove: listobj];

	return [super free];
}

- addToPool: (OFObject*)obj
{
118
119
120
121
122
123
124














125
		return self;

	[objects release];
	objects = nil;

	return self;
}














@end







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

127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
		return self;

	[objects release];
	objects = nil;

	return self;
}

- retain
{
	// FIXME: Maybe another exception would be better here?
	@throw [OFNotImplementedException newWithClass: isa
					   andSelector: _cmd];
}

- autorelease
{
	// FIXME: Maybe another exception would be better here?
	@throw [OFNotImplementedException newWithClass: isa
					   andSelector: _cmd];
}
@end