PFQueryTableView memory

I worked with PFQueryTableView with images and text. After implementing this code:

 - (id)initWithCoder:(NSCoder *)aDecoder { self = [super initWithClassName:@"Story"]; self = [super initWithCoder:aDecoder]; if (self) { // This table displays items in the Todo class self.parseClassName = @"Story"; self.pullToRefreshEnabled = YES; self.paginationEnabled = YES; self.objectsPerPage = 25; } return self; } - (PFQuery *)queryForTable { PFQuery *query = [PFQuery queryWithClassName:self.parseClassName]; if (self.objects.count == 0) { query.cachePolicy = kPFCachePolicyCacheThenNetwork; } [query orderByDescending:@"createdAt"]; return query; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object { static NSString *cellIdentifier = @"cell"; PFTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; if (!cell) { cell = [[PFTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellIdentifier]; } // Configure the cell to show todo item with a priority at the bottom cell.textLabel.text = object[@"snapDetails"]; PFFile *thumbnail = [object objectForKey:@"snap"]; cell.imageView.image = [UIImage imageNamed:@"placeholder.jpg"]; cell.imageView.file = thumbnail; return cell; } 

the log gives me this strange warning:

[/BuildRoot/Library/caches/com.apple.xbs/Sources/CoreUI/CoreUI-
371.4 / Bom / Storage / BOMStorage.c: 522] is not a BOMStorage file

along with a warning about regular memory. Sometimes the application also crashes, and XCode displays a message stating that it has lost connection with my iPhone . When checking memory usage, when the table goes up or down, the memory continues to grow, as if the images (whose screen size is not displayed) were never released as they exit the screen. Any ideas on what might happen?

+6
source share
1 answer

in almost all cases, it is safe if your url is wrong. To make the BOMStorage file more serious, you can add this:

 urlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]; 

Alternatively, you can choose another method to replace:

 [image stretchableImageWithLeftCapWidth:0 topCapHeight:0] forState:UIControlStateNormal] 
0
source

All Articles