Note that there are some explanatory texts on larger screens.

plurals
  1. POWeird memory leak that drives me crazy!!!
    primarykey
    data
    text
    <p>OK here's a weird one!</p> <p>this is the code:</p> <p>@synthesize imageViewX, myScrollViewX;</p> <pre><code>- (void)viewDidLoad { imageViewX = [[UIImageView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame]; imageViewX.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; imageViewX.contentMode = UIViewContentModeScaleAspectFit; imageViewX.backgroundColor = [UIColor clearColor]; //self.view = imageView; myScrollViewX.contentSize = CGSizeMake(imageViewX.frame.size.width, imageViewX.frame.size.height); myScrollViewX.backgroundColor = [UIColor blackColor]; myScrollViewX.maximumZoomScale = 4.0; myScrollViewX.minimumZoomScale = 1.0; myScrollViewX.clipsToBounds = YES; myScrollViewX.delegate = self; CGPoint scrollCenter = [myScrollViewX center]; [imageViewX setCenter:CGPointMake(scrollCenter.x, scrollCenter.y )]; [myScrollViewX addSubview:imageViewX]; self.view = myScrollViewX; [myScrollViewX autorelease]; } - (void)viewWillAppear:(BOOL)animated { imageViewX.image = [stm.image valueForKey:@"image"]; } - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return imageViewX; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); } - (void)dealloc { [super dealloc]; [imageViewX release]; [xray release]; } @end </code></pre> <p>Here is the situation: Drill down tableview app. select row. go into View1 with tableview with tableheaderview. tableheaderview got two buttons. button1 takes you to the view with the described code above. button2 takes you to a view with exact similar code!</p> <p>If i call the first button1 and return to the View1 and back to initial view NO LEAKS If i select another row, go to View1 and select button1 and back to initial view NO LEAKS 3rd time lucky!!Do the same exact thing as above GOT LEAKS!!!</p> <p>WHY????</p> <p>Senario 2 select row go to View1 select button1 go to view with code above, back, select button2 go to view with exact code as above GOT LEAKS!!! drives me crazy!!!!</p> <p>HELP???</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload