Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFM to Mach-O Conversion Crash in CodeWarrior (SOLVED)



On Oct 26, 2005, at 11:49 PM, Eric Schlegel wrote:

As John Stiles said, this is absolutely incorrect in both CFM and mach-o. You should not release auxAppBundle for either build.

When using CoreFoundation API, anything that is returned by an API with "Get" in the name does not need to be released, and anything returned by an API with "Create" or "Copy" in the name does need to be released.

You were just getting lucky that this didn't crash in CFM - probably a few more or fewer heap blocks were allocated in the CFM case, just enough to change the allocation pattern.

You're right - as a pattern - and that's what I usually abide by. However, I didn't touch this code for almost 4 years - and I'm pretty sure that I put that there because at one time or the other (probably current code too), the Core Foundation was not following it's own rules. I remember this vividly because when I first ran an early MallocDebug over my app - there were two or three Core Foundation "Get" calls that were leaking... which is no doubt why I put that there.


Eric - do you have any way to look into the CF code to see if this is true of this call? I could file a bug. I wonder whether this was something that was fixed in the post 10.3.0 SDK... hmmmm. I'd hate to think I've had a crasher out there for this long; although I've never seen a crash report against our shipping app that ended up being anywhere near the Core Foundation.

Food for thought.
Mark

--
Mark D. Gerl, email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >CFM to Mach-O Conversion Crash in CodeWarrior (From: "Mark D. Gerl" <email@hidden>)
 >Re: CFM to Mach-O Conversion Crash in CodeWarrior (From: "Mark D. Gerl" <email@hidden>)
 >Re: CFM to Mach-O Conversion Crash in CodeWarrior (From: Eric Schlegel <email@hidden>)
 >Re: CFM to Mach-O Conversion Crash in CodeWarrior (SOLVED) (From: "Mark D. Gerl" <email@hidden>)
 >Re: CFM to Mach-O Conversion Crash in CodeWarrior (SOLVED) (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.