Re: After Autoreleasing Still Getting Leaked
Re: After Autoreleasing Still Getting Leaked
- Subject: Re: After Autoreleasing Still Getting Leaked
- From: Bing Li <email@hidden>
- Date: Thu, 16 Jun 2011 03:37:00 +0800
OK. That's a good solution to XML transmission.
However, it should not be the reason to cause memory leaks, right?
On Thu, Jun 16, 2011 at 3:33 AM, Jens Alfke <email@hidden> wrote:
>
> On Jun 15, 2011, at 12:24 PM, Bing Li wrote:
>
> > The string can be any length. I put the received strings into a queue and
> > another thread gets the strings out of the queue and parse there.
> Actually,
> > the string is XML. During the test, the string length is always 259.
>
> If it’s XML, you should avoid converting the data into strings yourself,
> and just pass the raw bytes into the XML parser. That will fix the problem
> with UTF-8 sequences being split across reads, and it also allows the XML
> parser to use the metadata in the file to decide what encoding to use.
>
> —Jens
_______________________________________________
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