• 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
"Cannot finalize a class object"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Cannot finalize a class object"


  • Subject: "Cannot finalize a class object"
  • From: Nick Zitzmann <email@hidden>
  • Date: Tue, 6 Jan 2009 22:08:32 -0700

I've searched around and found nothing useful. I'm working on a non- GUI Foundation application (thus no NSApplication or window server connection), and thought I'd turn on GC in the app.

The first thing it does is it calls objc_startCollectorThread() at the top of main(). Then later on in main(), I call an object's class method. Shortly afterward, I get the strangest exception on the collector thread:

*** +[CHException<0x1038140> finalize]: cannot finalize a class object

I wish I could ignore this, but unfortunately, the collector doesn't seem to recover from finalization exceptions very well, and the app crashes when attempting to allocate some scanned memory shortly afterward. I can take out this class method; it's not terribly important to the program's execution, but why is this happening and how do I work around this (other than taking it out)?

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: "Cannot finalize a class object"
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: 2-pixel borders in NSSplitView - I want 1 pixel. [SOLVED]
  • Next by Date: Re: [iPhone] Search control like in App Store
  • Previous by thread: Re: Programatically locking user screen
  • Next by thread: Re: "Cannot finalize a class object"
  • Index(es):
    • Date
    • Thread