Author: rmottola
Date: Tue Oct 21 18:26:14 2014
New Revision: 38126

URL: http://svn.gna.org/viewcvs/gnustep?rev=38126&view=rev
Log:
Cleanup NSConnectionDidDieNotification when thread exits, other clean ups.

Modified:
    apps/gworkspace/trunk/ChangeLog
    apps/gworkspace/trunk/Operation/FileOpInfo.m

Modified: apps/gworkspace/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/ChangeLog?rev=38126&r1=38125&r2=38126&view=diff
==============================================================================
--- apps/gworkspace/trunk/ChangeLog     (original)
+++ apps/gworkspace/trunk/ChangeLog     Tue Oct 21 18:26:14 2014
@@ -1,3 +1,11 @@
+2014-10-21 Riccardo Mottola <[email protected]>
+
+       * Operation/FileOpInfo.h
+       Match protocol to actual class, making endOperation synchronous.
+
+       * Operation/FileOpInfo.m
+       Cleanup NSConnectionDidDieNotification when thread exits, other clean 
ups.
+
 2014-10-13 18:58-EDT Gregory John Casamento <[email protected]>
 
        * Operation/FileOpInfo.m: Set executor to nil when thread

Modified: apps/gworkspace/trunk/Operation/FileOpInfo.m
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Operation/FileOpInfo.m?rev=38126&r1=38125&r2=38126&view=diff
==============================================================================
--- apps/gworkspace/trunk/Operation/FileOpInfo.m        (original)
+++ apps/gworkspace/trunk/Operation/FileOpInfo.m        Tue Oct 21 18:26:14 2014
@@ -41,6 +41,8 @@
 
 - (void)dealloc
 {
+  [nc removeObserver: self];
+
   RELEASE (operationDict);
   RELEASE (type);
   RELEASE (source);
@@ -283,11 +285,13 @@
 
 - (void) threadWillExit: (NSNotification *)notification
 {
-  NSLog(@"%@",NSStringFromSelector(_cmd));
-  [[NSNotificationCenter defaultCenter] 
-    removeObserver:self
-             name:NSThreadWillExitNotification
-           object:nil];
+  [nc removeObserver:self
+                name:NSThreadWillExitNotification
+              object:nil];
+  
+  [nc removeObserver: self
+                name: NSConnectionDidDieNotification 
+              object: execconn];
 
   executor = nil;
 }
@@ -385,8 +389,6 @@
   NSArray *pFiles;
   NSUInteger i;
 
-
-  NSLog(@"removing processed files");
   pFData = [executor processedFiles];
   pFiles = [NSUnarchiver unarchiveObjectWithData: pFData];
 
@@ -508,8 +510,6 @@
     [win saveFrameUsingName: @"fopinfo"];
     [win close];
   }
-
-  [nc removeObserver: self];
   
   if (executor) {
     [nc removeObserver: self
@@ -525,8 +525,8 @@
 - (void)sendWillChangeNotification
 {
   CREATE_AUTORELEASE_POOL(arp);
-       NSMutableDictionary *dict = [NSMutableDictionary dictionary];   
-  int i;
+  NSMutableDictionary *dict = [NSMutableDictionary dictionary];        
+  NSUInteger i;
     
   notifNames = [NSMutableArray new];
   
@@ -888,7 +888,6 @@
 
   if (continueFrom == 0)
     {
-      NSLog(@"calculating num files");
       for (i = 0; i < [files count]; i++)
         {
           CREATE_AUTORELEASE_POOL (arp);
@@ -1403,7 +1402,7 @@
 - (void)done
 {
   [fileOp sendDidChangeNotification];
-  [fileOp endOperation];  
+  [fileOp endOperation];
 }
 
 - (BOOL)fileManager:(NSFileManager *)manager 


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to