Re: After Autoreleasing Still Getting Leaked
Re: After Autoreleasing Still Getting Leaked
- Subject: Re: After Autoreleasing Still Getting Leaked
- From: Jens Alfke <email@hidden>
- Date: Wed, 15 Jun 2011 12:33:36 -0700
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
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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