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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:17:11+00:00 2026-05-29T19:17:11+00:00

What i understood about object allocations and its release in objective is ..this.. if

  • 0

What i understood about object allocations and its release in objective is ..this..
if suppose i allocated one object with alloc init then i need to release it after its last reference .
Like this way….

 MyViewController *myView=[MyViewController alloc ]init];
 [self.view presentModalViewController myView animated:YES];
  [myView release];

However if suppose i need NSMutableArray .
and i set its as

  @property(nonatomic, retain)NSMutableArray *myArr; 

and need this array through out my viewcontroller means for instance say …. view has uitableview and its data source is this array (myArr).

And app is having its local copy of data storage through Sqlite3 .

so i m adding object to this array using select statemnt of sqlite 3 .

And as i need this data each time viewappears so i allocated this myArr in viewDidAppear
as…

myArr=[NSMutableArray alloc]init];

and i need to add value to each cell of uitableview in cellForRowAtIndexPath () method .

Means its las refernce is in cellForRowAtIndexPath()

So my question is that where should i release this allocated object of myArr

thnx in advnce

Kind Regards
Pagggyyy

  • 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-29T19:17:12+00:00Added an answer on May 29, 2026 at 7:17 pm

    I think the proper place would be

    - (void)viewDidUnload
    {
        [super viewDidUnload];
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We know about the complete pattern of alloc/init that alloc and init must be
There is one aspect of TDD which I never fully understood. Suppose somebody asked
I understand that boxing and unboxing is about casting (real type to object... object
After reading Practical Common Lisp I finally understood what the big deal about macros
Recently I was reading about Codd's 12 Rules , and I understood all except
I don't claim to know anything about svn, but I thought I understood how
according to this code i dont understand about NSClassFromString how did i know viewControllerName
One of the most difficult things about understand Spring is that Spring supports multiple
just when I thought I understood something about type conversion in JavaScript, I stumbled
I'm really pulling my hair out on this one, it seems that I'm having

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.