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 <j...@mooseyard.com> 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com