• 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: seg fault quandry
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: seg fault quandry


  • Subject: Re: seg fault quandry
  • From: Ondra Cada <email@hidden>
  • Date: Mon, 1 Mar 2004 21:49:44 +0100

On Monday, Mar 1, 2004, at 21:00 Europe/Prague, pmcurry wrote:

n = [NSNumber numberWithInt:2];
[ma insertObject:n atIndex:1];
[n release];
...
Later in my code I have this happening:

[levelSize count] gives 2, but
[levelSize objectAtIndex:1] gives a segmentation fault or bus error!

What am I missing?

You are missing nothing, but the very opposite: you have too much of something. Namely, of releases. Note that objects created by the factory method like "classNameWith..." come autoreleased!
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.


References: 
 >seg fault quandry (From: pmcurry <email@hidden>)

  • Prev by Date: drawing an image in an NSRect?
  • Next by Date: Re: Is there a bug in #include operation?
  • Previous by thread: Re: seg fault quandry
  • Next by thread: Is there a bug in #include operation?
  • Index(es):
    • Date
    • Thread