• 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 Leak with NSMutable String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Leak with NSMutable String


  • Subject: Re: Memory Leak with NSMutable String
  • From: Peter Maurer <email@hidden>
  • Date: Mon, 26 Jan 2004 15:14:47 +0100

Does this mean that the memory used by these NSMutableString will only be released once the NSAutoreleasePool is released.

Exactly.

Currently the memory usage seems to increase even though I am only using one instance of NSMutableString.

Well, you're creating a new NSMutableString each time you call "doOtherStuff()".

Would this problem go away if instead of initialising the NSMutuableString with the initWith method I would rather call init and then release it manually rather then relying on auto release ?

You probably mean "use alloc and init instead of stringWith...". Then my answer is Yes.

Thanks

You're welcome,

Peter Maurer.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Memory Leak with NSMutable String (From: "Alexander F. Hartner" <email@hidden>)
 >Re: Memory Leak with NSMutable String (From: Peter Maurer <email@hidden>)
 >Re: Memory Leak with NSMutable String (From: "Alexander F. Hartner" <email@hidden>)

  • Prev by Date: Re: Memory Leak with NSMutable String
  • Next by Date: NSRect and NSPoint question
  • Previous by thread: Re: Memory Leak with NSMutable String
  • Next by thread: Re: Memory Leak with NSMutable String
  • Index(es):
    • Date
    • Thread