dealloc

    2热度

    3回答

    我有一个对象Person和协议PersonDelegate Person具有@property (assign) id<PersonDelegate> delegate; 的地方在我的代码我做的: Person *newPerson = [[Person alloc] init]; newPerson.delegate = theDelegate; ... [theDelegate rele

    0热度

    1回答

    我有内存泄漏 我的代码序列是这样的 viewController1 = [[ViewController alloc] init]; destinationViewController = [[DestinationViewController alloc] init]; [destinationViewCOntroller useView:viewController1.vi

    0热度

    2回答

    我有一个的NSOperation NSOperationQueue,在我的NSOperation .hi具有这种性质: @interface MyOperationClass : NSOperation @property (strong, nonatomic) NSFetchedResultsController *fetchedResultsController; @property (s

    0热度

    2回答

    我曾尝试使用分析仪器看到内存泄漏和Xcode中给了我在这一点上内存泄漏: .H @property (strong, nonatomic) NSManagedObjectContext *managedObjectContext; .M @synthesize managedObjectContext = __managedObjectContext; 然后在代码中,我这样做: AppDe

    0热度

    2回答

    我知道标题听起来可能有点不可思议,但同样适用于这个问题。 我一直在测试我的应用程序在模拟器上几乎是在发展的整个时间,我没有在真实的设备上,而一次测试,以确保公正。 但现在我已经接近完成一个问题了。 每当我大跳登录,我的整个应用程序崩溃说的用户名和密码变量被释放...... 这里是我的应用程序的流程: 当打开的应用程序,它会检查用户名和密码被保存或注意 - (void)checkIfPrevious

    3热度

    2回答

    当内存压力下会调用dealloc吗?如果是这样,是否在didReceiveMemoryWarning之前或之后调用?另外,当视图控制器被释放时,是否可以调用dealloc?

    1热度

    2回答

    我有一个UIAlertView带有2个按钮。但我无法得到它的clickedButtonAtIndex事件。问题是因为- (void)dealloc方法被过早调用,我将代理设置为nil。因为警报视图按钮点击无法处理。这可能是什么原因。 编辑: 我的代码有2个流向。在一个流向上,它的工作正常。 dealloc方法以正确的方式被调用。视图提前发布没有问题。 但是在第二个流程中,出现了这个问题。到目前为止

    0热度

    1回答

    我有一个UIView子类,在此我调用这个其他UIView子类。 Stars.h @interface Stars : UIView { BOOL _gained; } @property (nonatomic, weak) id<NSObject> delegate; @property (nonatomic) BOOL gained; -(void)animateAnd

    0热度

    6回答

    我有一个问题。在我的.h: NSString *string; @property(nonatomic, retain)NSString *string; 在我的.m: string=[NSString stringWithFormat:@"%@", otherStringWithValue]; 好吧, “stringWithFormat” 是一个自动释放方法。我需要在dealloc中

    0热度

    2回答

    该项目目前有一个名为“Dashboard”的UIviewController,它充当所有应用程序的主视图。这个主视图由两个子视图组成,有点像分割视图。主(左视图)的左侧有多个按钮。右侧(右侧视图)将显示左侧选定按钮的内容。 当按钮被按下它会创建一个要显示这样的观点的一个新实例: vcMySchedule_iPad *vcSchedule = [[vcMySchedule_iPad alloc] i