Author: fredkiefer
Date: Sun Aug 31 21:47:45 2014
New Revision: 38052
URL: http://svn.gna.org/viewcvs/gnustep?rev=38052&view=rev
Log:
* GormCore/GormDocument.m: Rewrite fix for bug #39072 to stop
leaking memory.
Modified:
apps/gorm/trunk/ChangeLog
apps/gorm/trunk/GormCore/GormDocument.m
Modified: apps/gorm/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gorm/trunk/ChangeLog?rev=38052&r1=38051&r2=38052&view=diff
==============================================================================
--- apps/gorm/trunk/ChangeLog (original)
+++ apps/gorm/trunk/ChangeLog Sun Aug 31 21:47:45 2014
@@ -1,3 +1,8 @@
+2014-08-31 Fred Kiefer <[email protected]>
+
+ * GormCore/GormDocument.m: Rewrite fix for bug #39072 to stop
+ leaking memory.
+
2014-07-21 Fred Kiefer <[email protected]>
* GormCore/GormImage.m: Fix the init issue for the second
@@ -26,7 +31,6 @@
* GormCore/GormInspectorsManager.m
Explicitely cast NSIntegers to avoid warning and problems.
->>>>>>> .r37930
2014-05-27 03:26-EDT Gregory John Casamento <[email protected]>
* GormCore/GormInspectorsManager.m
Modified: apps/gorm/trunk/GormCore/GormDocument.m
URL:
http://svn.gna.org/viewcvs/gnustep/apps/gorm/trunk/GormCore/GormDocument.m?rev=38052&r1=38051&r2=38052&view=diff
==============================================================================
--- apps/gorm/trunk/GormCore/GormDocument.m (original)
+++ apps/gorm/trunk/GormCore/GormDocument.m Sun Aug 31 21:47:45 2014
@@ -2114,13 +2114,12 @@
* Set aName for object in the document. If aName is nil,
* a name is automatically created for object.
*/
-- (void) setName: (NSString*)someName forObject: (id)object
+- (void) setName: (NSString*)aName forObject: (id)object
{
id oldObject = nil;
NSString *oldName = nil;
NSMutableDictionary *cc = [classManager customClassMap];
NSString *className = nil;
- NSString *aName = [someName copy];
if (object == nil)
{
@@ -2208,16 +2207,15 @@
// check the custom classes map and replace the appropriate
// object, if a mapping exists.
- if(cc != nil)
+ if (cc != nil)
{
className = [cc objectForKey: oldName];
- RETAIN(className);
- if(className != nil)
- {
- RETAIN(oldName);
+ if (className != nil)
+ {
+ RETAIN(className);
[cc removeObjectForKey: oldName];
[cc setObject: className forKey: aName];
- RELEASE(oldName);
+ RELEASE(className);
}
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs