• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [array release] not happening.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [array release] not happening.


  • Subject: Re: [array release] not happening.
  • From: Shawn Erickson <email@hidden>
  • Date: Fri, 12 Jul 2002 08:58:12 -0700

Don't follow the surrounding logic but I assume it makes sense in the full method...

How do you know it is not released?

If it isn't being released then something else has a reference to it or it may have a pending autorelease. You can ask allMounted its current reference count ([allMounted retainCount] ) to get an idea or use the debugger.

-Shawn

On Friday, July 12, 2002, at 08:19 AM, Gjermund Gusland Thorsen wrote:

Why doesn't this:

i = [ allMounted count ];
// fprintf( stderr, "allMounted: %i\n", i);

if( i != 1 ){
[ allMounted removeObjectAtIndex:0 ];
mpEnum = [allMounted objectEnumerator];
} else {
[ allMounted release ];
}

release when i == 1 ??? I also tried:

// fprintf( stderr, "allMounted: %i\n", [ allMounted count ]);

if( [ allMounted count ] == 1 ){
[ allMounted release ];
} else {
[ allMounted removeObjectAtIndex:0 ];
mpEnum = [allMounted objectEnumerator];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: [array release] not happening.
  • Next by Date: Re: how to get a list of applications?
  • Previous by thread: Re: [array release] not happening.
  • Next by thread: GNUStep Help
  • Index(es):
    • Date
    • Thread