• 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
Leak in NSData +dataWithContentsOfURL:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Leak in NSData +dataWithContentsOfURL:


  • Subject: Leak in NSData +dataWithContentsOfURL:
  • From: Jonathan Feinberg <email@hidden>
  • Date: Thu, 14 Mar 2002 20:42:17 -0500

I finally managed to chase down the memory leak in my app. I believe that the NSData class method dataWithContentsOfURL:(NSURL *)url leaks memory. I have hacked up a quick demo, which you'll find at

http://MrFeinberg.com/leak.html

The bottom line is that the method allocates memory when constructing the NSData object, but the memory is not released when the NSData is released.

If any of you folks download and build the demo, I'd be very curious to hear about your experience.
--
Jonathan Feinberg email@hidden Inwood, NY, NY
http://MrFeinberg.com/
_______________________________________________
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.
  • Follow-Ups:
    • Re: Leak in NSData +dataWithContentsOfURL:
      • From: "Timothy J. Wood" <email@hidden>
  • Prev by Date: Re: Filtering all keyboard input in an NSTextView
  • Next by Date: Re: Draw NSMatrix Border Rect
  • Previous by thread: Re: Draw NSMatrix Border Rect
  • Next by thread: Re: Leak in NSData +dataWithContentsOfURL:
  • Index(es):
    • Date
    • Thread