Add onReset for CDVConnection.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/e9706dc9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/e9706dc9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/e9706dc9 Branch: refs/heads/master Commit: e9706dc976ac6062fe9aa56baaf3d29362a3eada Parents: 1252c54 Author: Braden Shepherdson <bra...@chromium.org> Authored: Tue Sep 25 11:14:08 2012 -0400 Committer: Braden Shepherdson <bra...@chromium.org> Committed: Tue Sep 25 11:14:08 2012 -0400 ---------------------------------------------------------------------- CordovaLib/Classes/CDVConnection.m | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/e9706dc9/CordovaLib/Classes/CDVConnection.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVConnection.m b/CordovaLib/Classes/CDVConnection.m index 37c55cc..9f648d1 100644 --- a/CordovaLib/Classes/CDVConnection.m +++ b/CordovaLib/Classes/CDVConnection.m @@ -147,6 +147,11 @@ - (void)dealloc { + [self onReset]; +} + +- (void)onReset +{ [[NSNotificationCenter defaultCenter] removeObserver:self name:kReachabilityChangedNotification object:nil]; }