我收到此錯誤「消息發送到解除分配實例0x141dafb0」它從UIBarButtonItem來的時候,它的beeing在應用程序上按下。任何幫助將不勝感激消息發送到解除分配的實例0x141dafb0 iPhone SDK
錯誤:
*** -[PeerConnection performSelector:withObject:withObject:]: message sent to deallocated instance 0x14143ff0
PeerConnection.h
#import <UIKit/UIKit.h>
#import <GameKit/GameKit.h>
@interface PeerConnection : NSObject <GKPeerPickerControllerDelegate, GKSessionDelegate> {
UIBarButtonItem *StartConnection;
}
- (IBAction) StartConnectionAction;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *StartConnection;
@end
PeerConnection.m
#import "PeerConnection.h"
@implementation PeerConnection
@synthesize StartConnection;
- (IBAction) StartConnectionAction {
NSLog(@"Start Connection to the other IPhones");
[StartConnection release];
}
- (void)dealloc {
[super dealloc];
}
@end
我已經啓用了殭屍,這是其所有給予我
我做過之前,但它仍然發出同樣的錯誤,但與不同的異常代碼現在它給我「*** - [PeerConnection performSelector:withObject:withObject:]:消息發送到釋放實例0x14159ff0」 – 2010-09-09 13:32:13
這就是發生在您提供給我們的代碼之外的某處。確保你在viewController之前不釋放任何東西,它將使用它deallocs。 – 2010-09-09 14:11:41