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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:40:32+00:00 2026-05-23T04:40:32+00:00

What would be the main differences between these two methods: + (id)videoGameWithTitle:(NSString *)newTitle publisher:(NSString

  • 0

What would be the main differences between these two methods:

+ (id)videoGameWithTitle:(NSString *)newTitle publisher:(NSString *)newPublisher year:(int)newYear {
    VideoGame *game = [[[VideoGame alloc] init] autorelease];
    game.title = newTitle;
    game.publisher = newPublisher;
    game.year = newYear;

    return game;
}

- (id)initVideoGameWithTitle:(NSString *)newTitle publisher:(NSString *)newPublisher year:(int)newYear {

    self = [super init];

    if(self) {
        self.title = newTitle;
        self.publisher = newPublisher;
        self.year = newYear;
    }
    return self;
}
  • 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-23T04:40:33+00:00Added an answer on May 23, 2026 at 4:40 am

    The first method is a class method that creates an object that the caller does not own and must not release. The second (aside from the typo in your original question) is an initializer, and since the caller has to call it in combination with +alloc, it returns an object that the caller owns and must release.

    For a full explanation, including a description of which method names imply ownership and which do not, have a look at Apple’s Memory Management Programming Guide.

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

Sidebar

Related Questions

I would like to show the differences between two blocks of text. Rather than
Possible Duplicate: Whats the main difference between int.Parse() and Convert.ToInt32 I would like to
What are the differences between SQLite and DISQLite and why would I want to
These two seem to be doing the same things. Can anyone explain the main
I would like to simplify my main build scripts, and I'd like to have
My Goal I would like to have a main processing thread (non GUI), and
My main JavaScript framework is jQuery , so I would like my unit test
How would I run both of them under one main website, say www.example.com, which
What are the main reasons someone would use HTML's tbody in a table? Is
The way you would normally include a script is with source eg: main.sh: #!/bin/bash

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.