title: ZBar crashes app
body: <p>Hi there I'm experiencing a little problem with my project.
  I made a QR e reader that will scan a bar code and then will search the result on my website but after scanning 6x my app just crash, I hope someone can help me with that.</p>
  
  <p>I'm new with Objective-C and iPhone SDK but I really need this project, thanks.</p>
  
  <p>AppDelegate.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @class ViewController;
  
  @interface AppDelegate : UIResponder &lt;UIApplicationDelegate&gt;
  
  @property (strong, nonatomic) UIWindow *window;
  @property (strong, nonatomic) ViewController *viewController;
  
  @end
  </code></pre>
  
  <p>ViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "ZBarSDK.h"
  
  @interface ViewController : UIViewController&lt;ZBarReaderDelegate&gt; {
      IBOutlet UIWebView *myWeb;
      IBOutlet UITextView *resultTextView;
  }
  
  - (IBAction)startScanning:(id)sender;
  
  @end
  </code></pre>
  
  <p>ViewController.m</p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  @end
  
  @implementation ViewController
  
  #pragma mark - ViewController's LifeCycle methods
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
  }
  
  #pragma mark - Button click method
  
  - (IBAction)startScanning:(id)sender {
  
      ZBarReaderViewController *codeReader = [ZBarReaderViewController new];
      codeReader.readerDelegate=self;
      codeReader.supportedOrientationsMask = ZBarOrientationMaskAll;
  
      ZBarImageScanner *scanner = codeReader.scanner;
      [scanner setSymbology: ZBAR_I25 config: ZBAR_CFG_ENABLE to: 0];
  
      [self presentViewController:codeReader animated:YES completion:nil];
  }
  
  #pragma mark - ZBar's Delegate method
  
  - (void) imagePickerController: (UIImagePickerController*) reader didFinishPickingMediaWithInfo: (NSDictionary*) info
  {
      //  get the decode results
      id&lt;NSFastEnumeration&gt; results = [info objectForKey: ZBarReaderControllerResults];
  
      ZBarSymbol *symbol = nil;
      for(symbol in results)
          // just grab the first barcode
          break;
  
      NSString *myString = [NSString stringWithFormat:@"http://www.northland-cc.com/%@", symbol.data];
      NSURL *url = [NSURL URLWithString:myString];
      NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
      [myWeb loadRequest:requestObj];
  
      // dismiss the controller
      [reader dismissViewControllerAnimated:YES completion:nil];
  }
  
  @end
  </code></pre>