Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 03-29-2011, 08:39 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2009
Posts: 29
itgiawa is on a distinguished road
Default NSScanner read only?

This code is works on the simulator but crashes on the device.

Here is a simplified example of the problem:

Code:
NSScanner* scanner = [NSScanner initWithString: source];

for(int i = 0; i < 2000; i++) 
{
       [scanner scanUpToString:@">" intoString:nil];
       [scanner scanString:@">" intoString:nil];
	source = [self upDateSource([scanner scanLocation]);  
     	scanner = [previewScanner initWithString:source];

}
The problem is that I'm allocating a new object after each iteration. Unfortunately there seems to be no way to simply update the string inside NSScanner...

Any ideas?
itgiawa is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 386
14 members and 372 guests
baja_yu, checkright, Duncan C, epaga, fvisticot, Meoz, mer10, Newbie123, Objective Zero, Punkjumper, reficul, rraagg, sacha1996, skrew88
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,642
Threads: 94,110
Posts: 402,857
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pinacate
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:30 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0