Re: Where or when do I release this object from this action.
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