• 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
dealloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dealloc


  • Subject: dealloc
  • From: Michael Witten <email@hidden>
  • Date: Fri, 8 Nov 2002 19:19:14 -0500

There is a class that has several instance variables (all pointers to
objects). It therefore has a dealloc instance method that releases all
of the variables that are being used and then sends [super dealloc].
This implementation works fine, but when the application exits there is
a SIGSEGV (11) error (the only instance of this class is used in the
main(...) function of the application, where it is added to an
autorelease pool that is sent a release message before returning).

Why does this error occur?

Also, is this what dealloc is supposed to be used for (there seems to
be a bit of ambiguity in the documentation:
Releasing_Shared_Objects.html: "NSObject's version of the method
deallocates the receiver's **instance variables**, but doesn't follow
**any variable** that points to other memory")?
_______________________________________________
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: Cursor Appears and Then Disappears
  • Next by Date: Re: Calling a unix command from Cocoa ?
  • Previous by thread: Re: Sample Code for "weak-linking" to a framework using NSAddressOfSymbol
  • Next by thread: How to constrain the dragging of a window
  • Index(es):
    • Date
    • Thread