• 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
NSData dataWithBytes:NoCopy:length free()'s the data (bug)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSData dataWithBytes:NoCopy:length free()'s the data (bug)


  • Subject: NSData dataWithBytes:NoCopy:length free()'s the data (bug)
  • From: Allan Odgaard <email@hidden>
  • Date: Fri, 1 Feb 2002 03:21:26 +0100

Hi there, I'm new to this list and MacOS in general, so I don't know if this is where I report bugs. If not then where do I report them?

If I add this code to my application:

char bytes[] = { 1, 2, 3, 4 };
NSData *data = [NSData dataWithBytesNoCopy:bytes length:sizeof(bytes)];

Then the console reports the following error:

*** malloc[16103]: Deallocation of a pointer not malloced: 0xbffffa48; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug

On another subject, if I create an NSURL object where the URL string contain [ or ], then the result is nil when I try to fetch data from this URL. It works if I escape the characters ([ and ]), but I don't think this should be necessary.


  • Prev by Date: ProgressIndicator: Chasing Arrow missing in cocoa?
  • Next by Date: Sliding tab-pages in ProjectBuilder: custom subclass?
  • Previous by thread: Re: Overiding NSButton initWithFrame: (doesn't work)
  • Next by thread: Re: NSData dataWithBytes:NoCopy:length free()'s the data (bug)
  • Index(es):
    • Date
    • Thread