Releasing an unretained menu item?
Releasing an unretained menu item?
- Subject: Releasing an unretained menu item?
- From: jjoonathan <email@hidden>
- Date: Tue, 01 Mar 2005 17:12:57 -0700
Ok, I have a program that displays a menu in the status bar. Every once
in awhile, it has to refresh, delete all the old items, and put new ones
in. This works fine 99% of the time, but after awhile ( the amount of
time varies), the loop that releases each object in the menu gets this
error (for every item in the menu, and the address is naturally
different for each error):
*** malloc[506]: Deallocation of a pointer not malloced: 0x1abe630; This
could be a double free(), or free() called with the middle of an
allocated block; Try setting environment variable MallocHelp to see
tools to help debug
What is this? Does NSMenu for some reason not retain it's items (the
ones right before it crashes work fine out of the update method so they
must be retained)? What is going on? Again, the error seems to randomly
spring up. Any help would be appreciated!
jjoonathan
PS
Is there any way to catch errors, and say, display a dialog with the
error in it and abort the method that threw it, instead of having the
whole program crash?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden