ObjFW  Check-in [a86271a67a]

Overview
Comment:OFTimer: Release target in -[invalidate].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a86271a67a0671ec948205f2fa55688e64b43e3e1dc5d31677fb3d83d6c582e0
User & Date: js on 2012-12-20 14:20:23
Other Links: manifest | tags
Context
2012-12-20
14:24
OFHTTPServer: Add a timeout. check-in: 27120e14ca user: js tags: trunk
14:20
OFTimer: Release target in -[invalidate]. check-in: a86271a67a user: js tags: trunk
13:57
OFTimer: Make rescheduling possible. check-in: 4572170728 user: js tags: trunk
Changes

Modified src/OFTimer.m from [8cac3a9eb9] to [0447782afb].

388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
		OFDate *old = fireDate;
		fireDate = [[OFDate alloc]
		    initWithTimeIntervalSinceNow: interval];
		[old release];

		[[OFRunLoop currentRunLoop] addTimer: self];
	} else
		isValid = NO;
}

- (OFDate*)fireDate
{
	OF_GETTER(fireDate, YES)
}








|







388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
		OFDate *old = fireDate;
		fireDate = [[OFDate alloc]
		    initWithTimeIntervalSinceNow: interval];
		[old release];

		[[OFRunLoop currentRunLoop] addTimer: self];
	} else
		[self invalidate];
}

- (OFDate*)fireDate
{
	OF_GETTER(fireDate, YES)
}

420
421
422
423
424
425
426



427
428
429
430
431
432
433
{
	return interval;
}

- (void)invalidate
{
	isValid = NO;



}

- (BOOL)isValid
{
	return isValid;
}








>
>
>







420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
{
	return interval;
}

- (void)invalidate
{
	isValid = NO;

	[target release];
	target = nil;
}

- (BOOL)isValid
{
	return isValid;
}