bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #18912] [NSAutoreleasePool -autoreleaseCount] returns incorrect val


From: Pauli Ojala
Subject: [bug #18912] [NSAutoreleasePool -autoreleaseCount] returns incorrect value
Date: Tue, 30 Jan 2007 17:53:50 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

URL:
  <http://savannah.gnu.org/bugs/?18912>

                 Summary: [NSAutoreleasePool -autoreleaseCount] returns
incorrect value
                 Project: GNUstep
            Submitted by: pojala
            Submitted on: Tuesday 30/01/07 at 17:53
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:


[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.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?18912>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]