ObjFW  Diff

Differences From Artifact [11d5a8e0e1]:

To Artifact [df6d35b09d]:


337
338
339
340
341
342
343

344
345
346
347
348
349
350
}

- (instancetype)initWithHandle: (OFFileHandle)handle
{
	self = [super init];

	_handle = handle;


	return self;
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD







>







337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
}

- (instancetype)initWithHandle: (OFFileHandle)handle
{
	self = [super init];

	_handle = handle;
	_initialized = true;

	return self;
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
552
553
554
555
556
557
558
559
560
561
562
563
564
	_handle = OFInvalidFileHandle;

	[super close];
}

- (void)dealloc
{
	if (_handle != OFInvalidFileHandle)
		[self close];

	[super dealloc];
}
@end







|





553
554
555
556
557
558
559
560
561
562
563
564
565
	_handle = OFInvalidFileHandle;

	[super close];
}

- (void)dealloc
{
	if (_initialized && _handle != OFInvalidFileHandle)
		[self close];

	[super dealloc];
}
@end