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 <ja...@jimijon.com> 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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to