• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Where or when do I release this object from this action.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where or when do I release this object from this action.


  • Subject: Re: Where or when do I release this object from this action.
  • From: James Cicenia <email@hidden>
  • Date: Fri, 27 Feb 2009 16:42:15 -0600

OK -

The question is where do I release that object. If I put the release at the end of the method, nothing will pop into my view.
If I don't release it, it works fine, but then I am worried about a leak.


- (void)monthFruitAction:(id)sender{

MonthPickerViewController *mpvc = [[MonthPickerViewController alloc]initWithNibName:@"MonthPicker" bundle:nil]; <<==== If I autorelase, this method will NOT show my view.
[mpvc setMyParentController:self];
mpvc.view.frame =CGRectMake(19,66,260,258);
[fruitTypeView addSubview:mpvc.view];
[mpvc release] <<==== If I put this in, this method will NOT show my view.
}


So, I am wondering how I am to release this object.

Thanks
James


On Feb 27, 2009, at 4:23 PM, Shawn Erickson wrote:

On Fri, Feb 27, 2009 at 1:57 PM, James Cicenia <email@hidden> wrote:
Here is the scenario -

If I put [mpvc release] at the end, my popup won't show, which perplexes me.

At the end of what?

Please give us a much more complete picture when you ask a question
... otherwise you are wasting yours and our time.

-Shawn

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Where or when do I release this object from this action.
      • From: Graham Cox <email@hidden>
    • Re: Where or when do I release this object from this action.
      • From: Sherm Pendley <email@hidden>
References: 
 >Where or when do I release this object from this action. (From: James Cicenia <email@hidden>)
 >Re: Where or when do I release this object from this action. (From: "I. Savant" <email@hidden>)
 >Re: Where or when do I release this object from this action. (From: James Cicenia <email@hidden>)
 >Re: Where or when do I release this object from this action. (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: renaming a file with special/reserved characters in name
  • Next by Date: Re: Weird "Ignoring bogus layer size" error using Collection View
  • Previous by thread: Re: Where or when do I release this object from this action.
  • Next by thread: Re: Where or when do I release this object from this action.
  • Index(es):
    • Date
    • Thread