This method has slightly subtle semantics... The fname should be an MCNameRef and it is returned with 'get' not copy semantics, meaning that you don't have to release it in the caller. (i.e. Where you've changed getfontattrsnew() to pass fname into an MCAutoStringRef, it should just be MCNameRef, and you don't have to release after).