ObjFW  Check-in [cb9fd1e5dd]

Overview
Comment:Fix a bug causing an exception when autorelease was requested.
This happened when the last pool was released before.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cb9fd1e5dddd39c91031d616298af101c63756b4d9ddc990309b134c8152c43f
User & Date: js on 2009-01-20 14:53:58
Other Links: manifest | tags
Context
2009-01-24
15:24
Adjust API to introduction of OFAutoreleasePool. check-in: 1496808b81 user: js tags: trunk
2009-01-20
14:53
Fix a bug causing an exception when autorelease was requested.
This happened when the last pool was released before.
check-in: cb9fd1e5dd user: js tags: trunk
2009-01-10
03:28
Fix missing deletion of libobjfw.dll. check-in: 635bbd6db8 user: js tags: trunk
Changes

Modified src/OFAutoreleasePool.m from [d3843af4f8] to [53c2a094cf].

63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#endif
}

+ (void)addToPool: (OFObject*)obj
{
	OFList *pool_list = get_tls(pool_list_key);

	if (pool_list == nil) {
		[[self alloc] init];
		pool_list = get_tls(pool_list_key);
	}

	if (pool_list == nil || [pool_list last] == NULL)
		@throw [OFInitializationFailedException newWithClass: self];








|







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#endif
}

+ (void)addToPool: (OFObject*)obj
{
	OFList *pool_list = get_tls(pool_list_key);

	if (pool_list == nil || [pool_list last] == NULL) {
		[[self alloc] init];
		pool_list = get_tls(pool_list_key);
	}

	if (pool_list == nil || [pool_list last] == NULL)
		@throw [OFInitializationFailedException newWithClass: self];