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 7621399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:11:07+00:00 2026-05-31T04:11:07+00:00

Today I got a EXC_BAD_ACCESS ,so I debug the code to solve the problem.

  • 0

Today I got a “EXC_BAD_ACCESS” ,so I debug the code to solve the problem. Now I find out where
the problem is, but I don’t know why. Can you help me ?

in the
-(void) dealloc
{
….
[self.scrollView release];
// if I add comment to this line above ,my app will work, else it will die.
……

}

these are the places where I used the [scrollView]

@interface ChatFriendInfoController :UIViewController
{
    UIScrollView *scrollView;
}

@property (nonatomic, retain) IBOutlet UIScrollView *scrollView;

@implementation ChatFriendInfoController
@synthesize scrollView;

self.scrollView.frame = CGRectMake(0, 64, 320, 416);
self.scrollView.alwaysBounceVertical = YES;
self.scrollView.contentSize = CGSizeMake(320, 960);

[self.scrollView addSubview:infoTable];

That’s All . Thank you.

  • 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-31T04:11:09+00:00Added an answer on May 31, 2026 at 4:11 am

    When the @property line for scrollView is defined with “retain”, then the accessor functions that XCode builds for you will already have retain and release calls built-in.

    So, any time you use self.scrollview = , you are actually calling [self setScrollView:] which will release any previous object and retain the new one. So you can release the object and set the variable to nil with just self.scrollview = nil;

    With the code above, I can’t tell if you allocating and initializing a new UIScrollView object. If you haven’t, then there is nothing to release and trying to do so will crash.

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

Sidebar

Related Questions

I got a problem today. It had a method and I need to find
Today I got a really strange problem. Try to execute this C# code: class
I have never had a problem starting a new app, but today I got
I asked a question here earlier today and got that fixed, but now I
I got an error today while trying to do some formatting to existing code.
Today I've got an problem with an ObjectStream (Input and also Output). I used
Today I got here nice answer that will resolve my problem. Unfortunately, I forgot
The following snippet of code has been working fine for weeks but today I
It means I can't see traffic i got today. Also is it only specific
i search alot for this but can't find an aswer... I have made a

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.