ObjFW  Check-in [0fbbfb7158]

Overview
Comment:Make it very clear that OFExceptions don't use autorelease pools.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0fbbfb71588c0d5730516e3b904cd1efaf3643ff81562c9c5c108801302ac801
User & Date: js on 2009-11-22 16:57:39
Other Links: manifest | tags
Context
2009-11-26
09:50
Add -[firstItem] to OFDataArray and -[firstObject] to OFArray. check-in: 4d523be264 user: js tags: trunk
2009-11-22
16:57
Make it very clear that OFExceptions don't use autorelease pools. check-in: 0fbbfb7158 user: js tags: trunk
16:33
Add -[drain] to OFAutoreleasePool. check-in: 2f85ceeed7 user: js tags: trunk
Changes

Modified src/OFExceptions.h from [03c9f4b0e9] to [4830360b39].

37
38
39
40
41
42
43
44

45
46
47
48
49
50
51
 */
- (OFString*)string;
@end

/**
 * The OFException class is the base class for all exceptions in ObjFW.
 *
 * IMPORTANT: Exceptions do NOT use OFAutoreleasePools!!

 */
@interface OFException: OFObject
{
	Class	 class_;
	OFString *string;
}








|
>







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 */
- (OFString*)string;
@end

/**
 * The OFException class is the base class for all exceptions in ObjFW.
 *
 * IMPORTANT: Exceptions do NOT use OFAutoreleasePools and can't be autoreleased
 * either! You have to make sure to dealloc the exception in your @catch block!
 */
@interface OFException: OFObject
{
	Class	 class_;
	OFString *string;
}

Modified src/OFExceptions.m from [ebc97e05f6] to [58c24c0199].

100
101
102
103
104
105
106






107
108
109
110
111
112
113
	return class_;
}

- (OFString*)string
{
	return string;
}






@end

@implementation OFOutOfMemoryException
+ newWithClass: (Class)class__
	  size: (size_t)size
{
	return [[self alloc] initWithClass: class__







>
>
>
>
>
>







100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
	return class_;
}

- (OFString*)string
{
	return string;
}

- autorelease
{
	@throw [OFNotImplementedException newWithClass: isa
					      selector: _cmd];
}
@end

@implementation OFOutOfMemoryException
+ newWithClass: (Class)class__
	  size: (size_t)size
{
	return [[self alloc] initWithClass: class__