ObjFW  Check-in [43f9221508]

Overview
Comment:OFURL: Do -[copy] in a try block to prevent leaks.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.5
Files: files | file ages | folders
SHA3-256: 43f92215088dcaecbc3b672bda9bd0de13ccdc8a363c176fa2d1ecf5aee2f03b
User & Date: js on 2011-04-22 21:59:40
Other Links: branch diff | manifest | tags
Context
2011-04-23
01:32
Fix too big buffer in -[OFMutableString _applyTable:withSize:]. check-in: 1acf3d2817 user: js tags: 0.5
2011-04-22
21:59
OFURL: Do -[copy] in a try block to prevent leaks. check-in: 43f9221508 user: js tags: 0.5
20:43
OFStreamObserver: Don't ignore the timeout when using select(). check-in: e7bb41764c user: js tags: 0.5
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)