• 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: Memory Error -NSRTFReader?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Error -NSRTFReader?


  • Subject: Re: Memory Error -NSRTFReader?
  • From: David Remahl <email@hidden>
  • Date: Wed, 28 Nov 2001 16:20:49 +0100

> Hi all,
>
> I am learning Cocoa and trying to create a simple game and I have run into a
> problem I can't seem to solve. I think I have a general understanding as to
> how memory management works in Cocoa, but if this doesn't make any sense
> then let me know.

This does not make sense! And I mean that in the kindest sense...

> My app keeps dying with a "EXC_BAD_ACCESS" error in the debugger. When I
> step through the code the error occurs at this line:
>
> [NSRTFReader dealloc]

You shall (hardly) ever call dealloc directly! You should use the retain and
release mechanism. What is most definitely happening, is that some other
object (probably a part of cocoa) is still using the NSRTFReader object when
you release it.

There is an excellent article on StepWise on the topic of basic mem
management.

/ david remahl


  • Follow-Ups:
    • Re: Memory Error -NSRTFReader?
      • From: Peer Allan <email@hidden>
References: 
 >Memory Error -NSRTFReader? (From: Peer Allan <email@hidden>)

  • Prev by Date: Re: XML and NSCoder
  • Next by Date: Re: Memory Error -NSRTFReader?
  • Previous by thread: Memory Error -NSRTFReader?
  • Next by thread: Re: Memory Error -NSRTFReader?
  • Index(es):
    • Date
    • Thread