mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
File handle deallocation fix suggested by David
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38937 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ae55e1bce3
commit
d91dd0b821
2 changed files with 12 additions and 9 deletions
|
@ -99,16 +99,16 @@ extern "C" {
|
|||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||
DEFINE_BLOCK_TYPE(GSIndexSetEnumerationBlock, void, NSUInteger, BOOL*);
|
||||
- (void)enumerateIndexesInRange: (NSRange)range
|
||||
options: (NSEnumerationOptions)opts
|
||||
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||
- (void) enumerateIndexesInRange: (NSRange)range
|
||||
options: (NSEnumerationOptions)opts
|
||||
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||
/**
|
||||
* Enumerate all indices in the set by applying a block to them.
|
||||
*/
|
||||
- (void)enumerateIndexesUsingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||
- (void) enumerateIndexesUsingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||
|
||||
- (void)enumerateIndexesWithOptions: (NSEnumerationOptions)opts
|
||||
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||
- (void) enumerateIndexesWithOptions: (NSEnumerationOptions)opts
|
||||
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -359,11 +359,14 @@ static GSTcpTune *tune = nil;
|
|||
DESTROY(address);
|
||||
DESTROY(service);
|
||||
DESTROY(protocol);
|
||||
|
||||
[self finalize];
|
||||
|
||||
DESTROY(readInfo);
|
||||
DESTROY(writeInfo);
|
||||
|
||||
/* Finalize *after* destroying readInfo and writeInfo so that, if the
|
||||
* file handle needs to be closed, we don't generate any notifications
|
||||
* containing the deallocated object. Tnanks to david for this fix.
|
||||
*/
|
||||
[self finalize];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue