mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 10:11:03 +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,15 +99,15 @@ extern "C" {
|
||||||
|
|
||||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST)
|
||||||
DEFINE_BLOCK_TYPE(GSIndexSetEnumerationBlock, void, NSUInteger, BOOL*);
|
DEFINE_BLOCK_TYPE(GSIndexSetEnumerationBlock, void, NSUInteger, BOOL*);
|
||||||
- (void)enumerateIndexesInRange: (NSRange)range
|
- (void) enumerateIndexesInRange: (NSRange)range
|
||||||
options: (NSEnumerationOptions)opts
|
options: (NSEnumerationOptions)opts
|
||||||
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||||
/**
|
/**
|
||||||
* Enumerate all indices in the set by applying a block to them.
|
* Enumerate all indices in the set by applying a block to them.
|
||||||
*/
|
*/
|
||||||
- (void)enumerateIndexesUsingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
- (void) enumerateIndexesUsingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||||
|
|
||||||
- (void)enumerateIndexesWithOptions: (NSEnumerationOptions)opts
|
- (void) enumerateIndexesWithOptions: (NSEnumerationOptions)opts
|
||||||
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
usingBlock: (GSIndexSetEnumerationBlock)aBlock;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -359,11 +359,14 @@ static GSTcpTune *tune = nil;
|
||||||
DESTROY(address);
|
DESTROY(address);
|
||||||
DESTROY(service);
|
DESTROY(service);
|
||||||
DESTROY(protocol);
|
DESTROY(protocol);
|
||||||
|
|
||||||
[self finalize];
|
|
||||||
|
|
||||||
DESTROY(readInfo);
|
DESTROY(readInfo);
|
||||||
DESTROY(writeInfo);
|
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];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue