Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8367359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:08:08+00:00 2026-06-09T13:08:08+00:00

no errors — compile time or exceptions thrown at run time… builds fine. Am

  • 0

no errors — compile time or exceptions thrown at run time… builds fine. Am I doing the memory management wrong? ARC is enabled for all files.

viewcontroller.h:

#import <UIKit/UIKit.h>

@interface workViewController : UIViewController 
<CLLocationManagerDelegate>{

    CLLocationManager *locationManager; 

}


@property (strong, nonatomic) IBOutlet CLLocationManager *locationManager;

@end

viewcontroller.m :

#import "workViewController.h"

@interface workViewController ()

@end

@implementation workViewController
@synthesize locationManager;


-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {

    NSLog(@"i worked lol");


}
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the 
    //view, typically from a nib.

    locationManager.delegate = self;

    [locationManager startUpdatingLocation];

}

- (void)viewDidUnload
{
    [locationManager stopUpdatingLocation];
    [self setLocationManager:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

@end

prefix.pch:

#import <Availability.h>

#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif

#ifdef __OBJC__
    #import <UIKit/UIKit.h>
    #import <Foundation/Foundation.h>
    #import <CoreLocation/CoreLocation.h>
#endif

Anyway, this code worked once the first time I built the app. Ive been struggling a lot with this, mainly it working sometimes and other times not working at all until i restart my computer. Am I doing memory management completely wrong?

this perplexes me because I made sure I followed tutorials line by line….

the application breaks at where the delegate method is invoked:

    -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {

It just says thread1 breakpoint… and I’m not sure how to read the debugger (It just provides some hex that I don’t know what to do with…)

Anyway, I would love to know what I’m doing wrong!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:08:10+00:00Added an answer on June 9, 2026 at 1:08 pm

    Try to init your CLLocationManager object. In general, the way you chose to do this is pretty strange. Typically with Core Location, you would create an object that implements didUpdateToLocation as well as didFailWithError, create a delegate protocol, and init this object in your main thread where you need the location, and then call startUpdatingLocation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get the following errors when I try to compile any Android RenderScript sample
I'm receiving errors from Gtk that I can't track down. Every time my mouse
I am having compile errors. Could you guys help me get aroudn it. This
Any errors that are thrown on the server side (PHP) is captured in a
I get these errors when I try to compile a matrix CUBLAS operation: 1>ClCompile:
I am getting some errors thrown in my code when I open a Windows
My project has no errors, I'm able to run it via F5, but I
When having errors in my queries, the exception which is thrown by Symfony2 is,
I'm getting some errors when using strcpy_s and can't figure out what I'm doing
The errors are coming through fine in my file appender, but not in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.