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

Group
 
 

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

Submitter:  Pauli Ojala <pojala>
Submitted:  Tue 30 Jan 2007 05:53:49 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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

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

Richard Frith-Macdonald <CaS>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-01-30 CaS StatusNone Fixed
        Open/ClosedOpen Closed
    2007-01-30 pojala Carbon-Copy- Added pojala

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code