ObjFW  Check-in [22ee389a21]

Overview
Comment:OFURL: Do -[copy] in a try block to prevent leaks.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 22ee389a21d81c74df5cb02f94f320f4f80f52616695b8589db2286fd293aa5d
User & Date: js on 2011-04-22 21:59:40
Other Links: manifest | tags
Context
2011-04-22
22:46
More style improvements. check-in: c9c78d86d3 user: js tags: trunk
21:59
OFURL: Do -[copy] in a try block to prevent leaks. check-in: 22ee389a21 user: js tags: trunk
21:08
More style improvements. check-in: fb95acc8ab user: js tags: trunk
Changes

Modified src/OFURL.m from [ae9145fa4e] to [0a4862ec8c].

358
359
360
361
362
363
364

365
366
367
368
369
370
371
372
373




374
375
376
377
378
379
380
	return hash;
}

- copy
{
	OFURL *new = [[OFURL alloc] init];


	new->scheme = [scheme copy];
	new->host = [host copy];
	new->port = port;
	new->user = [user copy];
	new->password = [password copy];
	new->path = [path copy];
	new->parameters = [parameters copy];
	new->query = [query copy];
	new->fragment = [fragment copy];





	return new;
}

- (OFString*)scheme
{
	OF_GETTER(scheme, YES)







>
|
|
|
|
|
|
|
|
|
>
>
>
>







358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
	return hash;
}

- copy
{
	OFURL *new = [[OFURL alloc] init];

	@try {
		new->scheme = [scheme copy];
		new->host = [host copy];
		new->port = port;
		new->user = [user copy];
		new->password = [password copy];
		new->path = [path copy];
		new->parameters = [parameters copy];
		new->query = [query copy];
		new->fragment = [fragment copy];
	} @catch (id e) {
		[new release];
		@throw e;
	}

	return new;
}

- (OFString*)scheme
{
	OF_GETTER(scheme, YES)