bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix, IMConnectors, establishConnection


From: Nicola Pero
Subject: Re: Fix, IMConnectors, establishConnection
Date: Thu, 12 Apr 2001 11:15:33 +0100 (BST)

Ahm - I'm not convinced by the fix - but the problem is - I don't know
exactly what problem you are having !  :-)

I had a quick look, and a problem I see is that GMUnarchiver is not able
to deallocate itself ...  Could you try removing your patch and applying
the following one ?


Index: GMArchiver.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Model/GMArchiver.m,v
retrieving revision 1.9
diff -u -r1.9 GMArchiver.m
--- GMArchiver.m        2000/03/04 18:30:11     1.9
+++ GMArchiver.m        2001/04/12 10:11:16
@@ -636,15 +636,22 @@
 
   propertyList = [plist copy];
   currentDecodedObjectRepresentation = propertyList;
-  namesToObjects = [NSMutableDictionary dictionaryWithCapacity: 119];
+  namesToObjects = RETAIN ([NSMutableDictionary
dictionaryWithCapacity: 119]);
 
   /* Decode version information */
   versionString = [propertyList objectForKey: @"Version"];
   [[NSScanner scannerWithString: versionString] scanInt: &version];
-
+  
   objectZone = NSDefaultMallocZone ();
 
   return self;
+}
+
+- (void) dealloc
+{
+  RELEASE (propertyList);
+  RELEASE (namesToObjects);
+  [super dealloc];
 }
 
 - (id) decodeObjectWithName: (NSString*)name



> Hi,
> 
> here is a patch for [IMOutletConnector establishConnection] which removes a  
> retain, which I think is one too much.
> My graphic application (being ported from OpenStep) uses gmodels extensivly,  
> and it now frees closed Windows as expected.
> 
> Georg
> 
> 
> 2001-04-11  Georg Fleischmann
> 
>       * gui/Model/IMConnectors.m
>       [IMOutletConnector establishConnection:]: retain removed
> 
> 
> diff -u gui/Model/IMConnectors.m.old gui/Model/IMConnectors.m
> 
> 
> --- gui/Model/IMConnectors.m.old      Wed Apr 11 19:35:57 2001
> +++ gui/Model/IMConnectors.m  Wed Apr 11 19:38:15 2001
> @@ -128,10 +128,7 @@
>    if (setSelector && [_source respondsToSelector:setSelector])
>      [_source performSelector:setSelector withObject:_destination];
>    else
> -    {
> -      [_destination retain];
>        GSSetInstanceVariable(_source, label, &_destination);
> -    }
>  }
> 
>  @end /* IMOutletConnector */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]