bugGNUstep - Bugs: bug #25553, gui bug when build with mingw32,...

 
 

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

bug #25553: gui bug when build with mingw32, with garbage collection

Submitted by:  Lu Liyi <luliyi1024>
Submitted on:  Wed 11 Feb 2009 04:06:58 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 11 Feb 2009 08:40:03 AM UTC, comment #3:

Yes, you use
IF_NO_GC(DESTROY(pool));
or
IF_NO_GC([pool release]);
depending on whether or not you want to set the value of poll to nil when not using GC.

Anyway, I've fixed this in subversion.

One caveat here ... while GC used to work fine with the base library many years ago, the gui and backend code was never really changed to work with GC. It might work with the new MacOS-X 10.5 APIs, but if it does it's likely to leak memory.
I'm concentrating on finishing the 10.5 APIs for gnustep-base and checking that everything works there before really looking at gui and back.

Richard Frith-Macdonald <CaS>
Project Member
Wed 11 Feb 2009 04:34:51 AM UTC, comment #2:

If GS_WITH_GC defined,

DESTROY means:
obj = nil;

and CREATE_AUTORELEASE_POOL(X) defined as null

so if you use a auto release pool like this:
-------------------------------
CREATE_AUTORELEASE_POOL(arp);
...
DESTROY(arp);
-------------------------------

it can not find the object 'arp'.

Lu Liyi <luliyi1024>
Wed 11 Feb 2009 04:18:06 AM UTC, comment #1:

I don't understand,

DESTROY is already defined differently based on if
GS_WITH_GC is defined or not, wasn't the point of all these macros so that they could be enabled and disabled based on if GC was there or not.

DESTROY is defined as (object = nil)
if GS_WITH_GC is enabled

and
id __o = object;
object = nil;
[__o release];
if GS_WITH_GC is not enabled,

why do we need another set of macros on top of that?
is IF_NO_GC somehow different than GS_WITH_GC?

matt rice <ratmice>
Project Member
Wed 11 Feb 2009 04:06:58 AM UTC, original submission:

file: core/gui/Source/NSTableView.m
line: 3877

DESTROY(arp);

missing IF_NO_GC(...)

Thank you.

Lu Liyi <luliyi1024>

 

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 ratmice (Posted a comment)
  • -unavailable- added by luliyi1024 (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 11 Feb 2009 08:40:03 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1