Permalink
Browse files

Fix: when open a new book the old book current page wasn't removed; n…

…ow, if exists on book init, the old current page is removed and released
  • Loading branch information...
1 parent 9f0e310 commit fa415eeb17013904de48c66aef9d9cf26e1ca933 @Xm4s Xm4s committed Mar 19, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 Classes/RootViewController.m
@@ -456,6 +456,17 @@ - (void)initBookProperties:(NSString *)path {
- (void)initBook:(NSString *)path {
NSLog(@"• Init Book");
+ // If a previous current page exist remove it before initialization
+ if (currPage)
+ {
+ currPage.delegate = nil;
+
+ [currPage removeFromSuperview];
+ [currPage release];
+
+ currPage = nil;
+ }
+
[self initBookProperties:path];
[self resetPageDetails];

0 comments on commit fa415ee

Please sign in to comment.