• 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
Re: memory deallocation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memory deallocation


  • Subject: Re: memory deallocation
  • From: Scott Ribe <email@hidden>
  • Date: Sat, 04 Apr 2009 16:18:17 -0600
  • Thread-topic: memory deallocation

> If for example I have a group of string #defines that are used in log
> messages, that means that I will have to malloc space for them the
> sprintf them to it, so I can be sure that I don't get that warning
> when deallocating the log messages.

That's a symptom of a bad design. You shouldn't be trying to deallocate
strings in code that has no idea how the strings were allocated in the first
place. You need to have a clear idea about "ownership" of all data.

--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


_______________________________________________

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

References: 
 >memory deallocation (From: Daniel Luis dos Santos <email@hidden>)

  • Prev by Date: Re: memory deallocation
  • Next by Date: Re: Need localization-proof method of transporting dates
  • Previous by thread: Re: memory deallocation
  • Next by thread: Re: Need localization-proof method of transporting dates
  • Index(es):
    • Date
    • Thread