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

  • SEARCH
  • Home
  • 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 971253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:56:00+00:00 2026-05-16T02:56:00+00:00

I have an iPad app in which I get the device’s UDID by the

  • 0

I have an iPad app in which I get the device’s UDID by the following code in the viewDidLoad method.

uid = [[UIDevice currentDevice] uniqueIdentifier];
uid = [uid stringByReplacingOccurrencesOfString:@"-" withString:@""];

I wanted to remove the dashes in the string.

Later, in another method call, I try to access this uid string (which is a property of this class),

NSLog("Loading request with UDID: %@", uid);

and I get the following in the console window when I try to print it out.

Loading request with UDID: (
    <WebView: 0x4b0fb90>
)

Why is it printing the memory address, instead of the string itself? Thanks!

  • 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-05-16T02:56:01+00:00Added an answer on May 16, 2026 at 2:56 am

    The issue you’re having has to do with memory management. I’ve had exactly this problem before.

    When you NSLog the uid, what you get is the address for a WebView object. Why would that happen when uid is an NSString??? Let me take you on a guided tour of the magic of memory management 😀

    When you set your uid variable on this line:

    uid = [uid stringByReplacingOccurrencesOfString:@"-" withString:@""];
    

    What you did was assign an autoreleased variable to uid. That means it will be released and that memory location will be up for grabs. Between this function ending and the next time you access it, it has been released and something else was stored there.

    How do you fix this? When you assign something to a property like uid, ALWAYS do it through the setter methods created by the @property declaration. Use either self.uid = string or [self setUid:string. This will properly release the old string and retain the new one.

    This is a problem that has cost me MANY hours trying to find the problematic line. Another symptom that can happen is the program crashing when you try to send a message to a released object. These can be VERY hard to track down. Hopefully my reply helps you and you don’t have to endure that frustration 🙂

    Good luck!

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

Sidebar

Related Questions

I have an iPad app which has a funky Path-style menu which is present
I have a iPad app which is NOT modified for the new iPad with
I have an iPhone/iPad app which play a HTTP Live Stream of a tv
I have a basic iPhone/iPad app which has a ; a. List view &
I have an app which has different app identifier for iphone and ipad and
I have my ipad code created programmatically not using nib.I converted my ipad app
I have an iPad app in which I'm setting the shadow color of a
I have an iPad app out on the app store which I'm interested in
In my current Ipad app, I have a split screen view in which the
I have developed the ipad app which displays images and other product details from

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.