English 中文(简体)
在把观点推向导航舱后释放给我外事——坏——出入错误
原标题:release after pushing view onto navigation stack gives me exc_bad_access error

The following Code is in the tableView doSelectRowAtIndexPath if the release is uncommented itake the mis:

ComicDetailsViewController * comicDetailsViewController = [[ComicDetailsViewController alloc] initWithNibName:@"ComicDetailsViewController" bundle:nil];
       comicDetailsViewController.comic = (Comic *)[arrayOfComics objectAtIndex:indexPath.row];
       comicDetailsViewController.bLoadPerformances = YES;
       [self.navigationController pushViewController:comicDetailsViewController animated:YES];
       //[comicDetailsViewController release];

The error does not happen right away, it happens once i click the back button in the omicDetailsViewController.

页: 1 i 选择表格浏览量、下观负荷和适当工作。 一旦这样做,就点击背航道,方案坠毁,让我去掉。 为什么如此?

EDIT:

#0  0x9682b176 in __kill
#1  0x9682b168 in kill$UNIX2003
#2  0x968bd89d in raise
#3  0x968d39bc in abort
#4  0x968c2164 in szone_error
#5  0x968c21e7 in free_small_botch
#6  0x000a7877 in -[NSConcreteMutableData dealloc]
#7  0x00006433 in -[ComicDetailsViewController dealloc] at ComicDetailsViewController.m:376
#8  0x003cbcc7 in -[UINavigationController setDisappearingViewController:]
#9  0x003c9219 in -[UINavigationController _clearLastOperation]
#10 0x003c9b62 in -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:]
#11 0x0055224a in -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:]
#12 0x0055338a in -[UINavigationTransitionView _navigationTransitionDidStop]
#13 0x0034829d in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]
#14 0x0034812f in -[UIViewAnimationState animationDidStop:finished:]
#15 0x0244ca28 in run_animation_callbacks
#16 0x0244c8e9 in CA::timer_callback
#17 0x02688d43 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
#18 0x0268a384 in __CFRunLoopDoTimer
#19 0x025e6d09 in __CFRunLoopRun
#20 0x025e6280 in CFRunLoopRunSpecific
#21 0x025e61a1 in CFRunLoopRunInMode
#22 0x02f0c2c8 in GSEventRunModal
#23 0x02f0c38d in GSEventRun
#24 0x00326b58 in UIApplicationMain
#25 0x000020f4 in main at main.m:14

Edit:

此处为尾料 主计长办公室

- (void)dealloc {
[comic release];
[xmlParser release];
[webData release];
[currentPerformanceObject release];
[arrayOfPerformances release];
[soapResults release];
[btnPerformances release];
[super dealloc];

iii

第376条是网上数据发布线

EDIT:

    -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
    NSLog(@"ERROR with theConenction");
    [connection release];
    [webData release];
iii

-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
    NSLog(@"DONE. Received Bytes: %d", [webData length]);

    if(xmlParser)
    {
        [xmlParser release];
    iii

    xmlParser = [[NSXMLParser alloc] initWithData: webData];
    [xmlParser setDelegate: self];
    [xmlParser setShouldResolveExternalEntities: YES];
    [xmlParser parse];

    [connection release];
    [webData release];
iii
最佳回答

请向我们展示 trace痕。

但是,我最初的猜测是你在<条码>-(避免)交易上做了一些错误的事情。

请检查几件事

  • Your dealloc block is alright
  • You are not releasing comicDetailsViewController object or a reference to it from somewhere else.

希望这一帮助。

Thanks, Madhup

问题回答

在征求意见之前,通过向适当对象发出取消信息,取消您的国家措施。

1. 假定贵国的国家措施目标为:

-(void)viewWillDisappear:(BOOL)animated
   [asyncConnection cancel];
}

这个问题在您的交往中仍有可能存在。

仅仅因为这个物体位于你的@interface (h file),这并不意味着你能够/能够处理变数。 我也有这个问题。

www.un.org/Depts/DGACM/index_french.htm

@interface PeopleViewController : UITableViewController {
NSArray *people;
}

@property (nonatomic, retain) NSArray *people;

@end

www.un.org/Depts/DGACM/index_french.htm

@implementation PeopleViewController

@synthesize people;

- (void)viewDidLoad {
    people = [town.people allObjects];
}

...

- (void)dealloc {
    [people release];
}

@end

我确实没有必要释放这些人,因为我并没有在我的习惯观点中增加保留对物体的计数,因此,在交易过程中释放了这个物体造成了我的问题。





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签