bugGNUstep - Bugs: bug #18912, [NSAutoreleasePool...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #18912: [NSAutoreleasePool -autoreleaseCount] returns incorrect value

Submitted by:  Pauli Ojala <pojala>
Submitted on:  Tue 30 Jan 2007 05:53:49 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 30 Jan 2007 06:08:43 PM UTC, comment #1:

Thanks ... well spotted.
I fixed that in subcersion.

Richard Frith-Macdonald <CaS>
Project Member
Tue 30 Jan 2007 05:53:49 PM UTC, original submission:

[NSAutoreleasePool -autoreleaseCount] seems to have a bug that causes it to return too small values (usually zero with my test case).

I've found a fix that appears to correct the problem, although I haven't tested it thoroughly. The fix is to remove the condition "&& released->count" from this loop in the method:

...
while (released && released->count)
{
count += released->count;
released = released->next;
}
...

I.e. the first line should become:
while (released)

I don't know much about GNUstep internals, I just stumbled upon this fix trying to figure out why my autorelease pool claimed to be empty when it clearly wasn't.

The error occurs on Win32/MinGW, I haven't tried any other platforms.

Pauli Ojala <pojala>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by pojala (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 30 Jan 2007 06:08:43 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 30 Jan 2007 05:53:49 PM UTCpojalaCarbon-Copy-=>Added pojala

    Back to the top


    Powered by Savane 3.1-cleanup1