Dear Developers,

in Rev 23291 of GSString when you create Strings with [NSArray 
componentsSeparatedByString:] the resulting GSCSubString objects have a 
retain-count of 2 (see attached code). With WebObjects on Windows the 
retain-count is 1. This makes a 200 MB difference when starting our App. 
Is this a known bug? Maybe fixed in newer Revs? I've scanned the svn log but 
found nothing appropriate.

-- 
Pirmin Braun - IntarS Unternehmenssoftware GmbH - Sinziger Str. 29a - 53424 
Remagen
+49 2642 308288 +49 174 9747584 - skype:pirminb www.intars.de  [email protected] 
intars.sourceforge.net
Geschäftsführer: Pirmin Braun, Ralf Engelhardt Registergericht: Amtsgericht 
Coburg HRB3136
...
    s = [NSSWCOF path];
    LOG_NSLog(@"IDM File loaded");

    lines = [s css: @"\n"];
    for(i=0,j=[lines count];i<j;i++){
        if(i<10){ LOG_NSLog(([NSSWF @"retainCount of %@ = %i",[lines 
oai:i],[[lines oai:i]retainCount]]));}
...


WO auf Windows:
Jan 07 19:12:17 Aprica3[3980] loading Repository from IDM
Jan 07 19:12:17 Aprica3[3980] IDM File loaded
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     -       dbName  _AKTIV 
= 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     -       guiName 
Aktiv/Inaktiv = 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     -       type    A = 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     -       bereich  = 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     -       bemerkung       
 = 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     __doku  dbName  __doku 
= 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     __doku  guiName Doku 
zur Tabelle = 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     __doku  keyTypS N = 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     __doku  dataTypS        
char = 1
Jan 07 19:12:17 Aprica3[3980] retainCount of _AKTIV     __doku  targetTypS      
TVCSelObj = 1
Jan 07 19:12:17 Aprica3[3980] IDM 33669 idmLines

GNUStep:
2013-01-07 19:12:26.476 Aprica3[21918] loading Repository from IDM
2013-01-07 19:12:26.526 Aprica3[21918] IDM File loaded
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    -       dbName  
_AKTIV = 2
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    -       guiName 
Aktiv/Inaktiv = 2
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    -       type    
A = 2
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    -       bereich 
 = 2
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    -       
bemerkung        = 2
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    __doku  dbName  
__doku = 2
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    __doku  guiName 
Doku zur Tabelle = 2
2013-01-07 19:12:26.664 Aprica3[21918] retainCount of _AKTIV    __doku  keyTypS 
N = 2
2013-01-07 19:12:26.665 Aprica3[21918] retainCount of _AKTIV    __doku  
dataTypS        char = 2
2013-01-07 19:12:26.665 Aprica3[21918] retainCount of _AKTIV    __doku  
targetTypS      TVCSelObj = 2


Revisions:
cd /usr/GNUstep/Local/Projects/Scripts/Aprica2/base/Source
svn update -r 29669 NSAutoreleasePool.m
svn update -r 29669 common.h
svn update -r 23291 GSString.m
cd ../Headers/Foundation
svn update -r 29669 NSAutoreleasePool.h
svn update -r 23291 GSString.h
cd /usr/GNUstep/Local/Projects/Scripts/Aprica2/base/Source
make install


in NSAutoreleasePool.m:
- (void)emptyPool
...
hash = (((unsigned)(uintptr_t)c) >> 3) & 0x0f;
if (classes[hash] != c)
{
  /* If anObject was an instance, c is it's class.
   * If anObject was a class, c is its metaclass.
   * Either way, get_imp() should get the appropriate pointer.
   * If anObject is a proxy to something,
   * the +instanceMethodForSelector: and -methodForSelector:
   * methods may not exist, but get_imp() will return the
   * address of the forwarding method if necessary.
   */
  imps[hash] = get_imp(c, @selector(release));
  classes[hash] = c;
}
if([anObject retainCount] > 1){fprintf(stderr,"retainCount > 1; %s 
%s\n",[[[anObject class] description]cString],[[[anObject description]s
ubstringToIndex:MIN(40,[[anObject description]length])]cString]);}
....

retainCount > 1; GSCSubString _AKTIV    -       dbName  _AKTIV
retainCount > 1; GSCSubString _AKTIV    -       guiName Aktiv/Inaktiv
retainCount > 1; GSCSubString _AKTIV    -       type    A
retainCount > 1; GSCSubString _AKTIV    -       bereich
retainCount > 1; GSCSubString _AKTIV    -       bemerkung
retainCount > 1; GSCSubString _AKTIV    __doku  dbName  __doku
retainCount > 1; GSCSubString _AKTIV    __doku  guiName Doku zur Tabelle
retainCount > 1; GSCSubString _AKTIV    __doku  keyTypS N
retainCount > 1; GSCSubString _AKTIV    __doku  dataTypS        char
retainCount > 1; GSCSubString _AKTIV    __doku  targetTypS      TVCSelObj
retainCount > 1; GSCSubString _AKTIV    __doku  nakS    0
retainCount > 1; GSCSubString _AKTIV    __doku  isDBS   N
retainCount > 1; GSCSubString _AKTIV    __doku  isVisibleS      N
_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to