奇怪的内存泄露 incorrect decrement of the reference count of an object that is not owned at this point by
2011-11-21 13:29
573 查看
LoginViewController *loginViewController = [[LoginViewController
alloc] initwithLoginUrl: loginUrl];
CustomNavigationController *customNavigationController = [[CustomNavigationController
alloc] initWithRootViewController: loginViewController];
customNavigationController.navigationBar.tintColor =
NavgaitonBar_Color;
[self.navigationController
presentModalViewController: customNavigationController
animated: YES];
[loginViewController
release];
[customNavigationController release];
红色为提示内存泄露的地方
只要把 LoginViewController *loginViewController = [[LoginViewController alloc] initwithLoginUrl: loginUrl];
修改为 LoginViewController *loginViewController = [[LoginViewController alloc] initWithLoginUrl: loginUrl];
就可以解决内存泄露
alloc] initwithLoginUrl: loginUrl];
CustomNavigationController *customNavigationController = [[CustomNavigationController
alloc] initWithRootViewController: loginViewController];
customNavigationController.navigationBar.tintColor =
NavgaitonBar_Color;
[self.navigationController
presentModalViewController: customNavigationController
animated: YES];
[loginViewController
release];
[customNavigationController release];
红色为提示内存泄露的地方
只要把 LoginViewController *loginViewController = [[LoginViewController alloc] initwithLoginUrl: loginUrl];
修改为 LoginViewController *loginViewController = [[LoginViewController alloc] initWithLoginUrl: loginUrl];
就可以解决内存泄露
相关文章推荐
- Incorrect decrement of the reference count of an object that is not owned at this point by the caller1
- Incorrect decrement of the reference count of an object that is not owned at this point by the calle
- Incorrect decrement of the reference count of an object that is not owned at this point by the calle
- Incorrect decrement of the reference count of an object that is not owned at this point by the caller1
- Installation failed with message...It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
- It is possible that this issue is resolved by uninstalling an existing version of the apk if it is
- It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing ___Error Installing APK
- “(null)” is of a model that is not supported by this version of Xcode.
- Sharepoint timer job:Object reference not set to an instance of an object
- “(null)” is of a model that is not supported by this version of Xcode.
- ERROR: a parameter or an operation is not supported by the underlying object
- 解决方案: the selected file is a solution file but was created by a newer version of this application an
- Phone may be running a version of iOS that is not supported by this version of Xcode.
- iPhone may be running a version of iOS that is not supported by this version of Xcode
- Sharepoint Error: "This server is not the indexer of this search application"
- 解决方案: the selected file is a solution file but was created by a newer version of this application an
- firefox同步ajax请求报错的问题 A parameter or an operation is not supported by the underlying object
- Question 30: What is the order of destructor calls for an object of class Y inherited from class X that has an object of class A
- The type 'System.Data.Objects.DataClasses.EntityObject' is defined in an assembly that is not refere
- webview使用遇到 It is possible that this object was over-released, or is in the process of deallocation错误的解决办法