Author: mlytwyn
Date: Thu Mar 23 17:49:23 2017
New Revision: 40410
URL: http://svn.gna.org/viewcvs/gnustep?rev=40410&view=rev
Log:
Retain/release fixes
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
Modified:
libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m?rev=40410&r1=40409&r2=40410&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
Thu Mar 23 17:49:23 2017
@@ -111,7 +111,7 @@
{
@synchronized([self class])
{
- ASSIGN(ApplicationClass, _className);
+ ASSIGNCOPY(ApplicationClass, _className);
}
}
}
@@ -195,9 +195,12 @@
{
if ([coder allowsKeyedCoding])
{
+ // label and source string tags have changed for XIB5...
ASSIGN(label, [coder decodeObjectForKey: @"selector"]);
ASSIGN(source, [coder decodeObjectForKey: @"target"]);
- ASSIGN(destination, [coder decodeObjectForKey: @"destination"]);
+ // destination string tag is still the same (so far) and loaded
+ // by base class...
+ //ASSIGN(destination, [coder decodeObjectForKey: @"destination"]);
}
else
{
@@ -224,9 +227,12 @@
{
if ([coder allowsKeyedCoding])
{
+ // label and source string tags have changed for XIB5...
ASSIGN(label, [coder decodeObjectForKey: @"property"]);
ASSIGN(source, [coder decodeObjectForKey: @"target"]);
- ASSIGN(destination, [coder decodeObjectForKey: @"destination"]);
+ // destination string tag is still the same (so far) and loaded
+ // by base class...
+ //ASSIGN(destination, [coder decodeObjectForKey: @"destination"]);
}
else
{
@@ -238,11 +244,14 @@
return self;
}
+#if 0
- (void) establishConnection
{
[super establishConnection];
+ // For some reason I needed this originally - but not now...
RETAIN(destination);
}
+#endif
@end
@@ -585,6 +594,9 @@
[objectRecord setElement: element forKey: @"object"];
[objectRecord setElement: parent forKey: @"parent"];
[objectRecord setElement: children forKey: @"children"];
+
+ RELEASE(parent);
+ RELEASE(children);
return AUTORELEASE(objectRecord);
}
@@ -659,8 +671,8 @@
[_objectRecords setElement: _orderedObjects forKey: @"orderedObjects"];
// flattenedProperties...
- [_flattenedProperties setElement: _runtimeAttributes forKey: [NSString
stringWithFormat: @"%@.IBAttributePlaceholdersKey",
- [[NSUUID UUID]
UUIDString]]];
+ NSString *runtimeAttributesKey = [NSString stringWithFormat:
@"%@.IBAttributePlaceholdersKey", [[NSUUID UUID] UUIDString]];
+ [_flattenedProperties setElement: _runtimeAttributes forKey:
runtimeAttributesKey];
}
- (void)dealloc
@@ -670,6 +682,7 @@
RELEASE(_objectRecords);
RELEASE(_flattenedProperties);
RELEASE(_runtimeAttributes);
+ RELEASE(_orderedObjects);
[super dealloc];
}
@@ -2791,7 +2804,6 @@
withID: (NSString*)objID
{
id object = [super decodeObjectForXib: element forClassName: classname
withID: objID];
-
// Create an ordered object for this element...
// This probably needs to be qualified but I have yet to determine
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs