I turned on garbage collection (objective-c 2.0) and the image for the status item disappeared when I restarted my application. I am manually memory managing the image and status item.
This application works normal when garbage collection is off (i.e. the status item doesn’t disappear.) Is there a way to make the garbage collection not collect specific variables or should I turn it off completely? When turning on garbage collection, my app’s memory drops from 100mb to 2mb.
How are you “manually managing the memory of the image and status item”? If you are using
releaseandretain, they are actually ignored under GC.Under GC, objects stick around if (a) you have a strong reference to them in GC scanned memory or you (b)
CFRetainthem.