Author: rfm
Date: Fri Aug 28 11:21:45 2015
New Revision: 38937
URL: http://svn.gna.org/viewcvs/gnustep?rev=38937&view=rev
Log:
File handle deallocation fix suggested by David
Modified:
libs/base/trunk/Headers/Foundation/NSIndexSet.h
libs/base/trunk/Source/GSFileHandle.m
Modified: libs/base/trunk/Headers/Foundation/NSIndexSet.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Headers/Foundation/NSIndexSet.h?rev=38937&r1=38936&r2=38937&view=diff
==============================================================================
--- libs/base/trunk/Headers/Foundation/NSIndexSet.h (original)
+++ libs/base/trunk/Headers/Foundation/NSIndexSet.h Fri Aug 28 11:21:45 2015
@@ -99,16 +99,16 @@
#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)enumerateIndexesWithOptions: (NSEnumerationOptions)opts
- usingBlock: (GSIndexSetEnumerationBlock)aBlock;
+- (void) enumerateIndexesUsingBlock: (GSIndexSetEnumerationBlock)aBlock;
+
+- (void) enumerateIndexesWithOptions: (NSEnumerationOptions)opts
+ usingBlock: (GSIndexSetEnumerationBlock)aBlock;
#endif
Modified: libs/base/trunk/Source/GSFileHandle.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/GSFileHandle.m?rev=38937&r1=38936&r2=38937&view=diff
==============================================================================
--- libs/base/trunk/Source/GSFileHandle.m (original)
+++ libs/base/trunk/Source/GSFileHandle.m Fri Aug 28 11:21:45 2015
@@ -359,11 +359,14 @@
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];
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs