【问题标题】:Memory warning when trying to load images in Collection View on iOS 7尝试在 iOS 7 上的 Collection View 中加载图像时出现内存警告
【发布时间】:2014-04-03 11:54:28
【问题描述】:

在 iOS7 上的 Collection View 中加载图像时收到此警告

警告:failed to set breakpoint site at 0x11428984c for breakpoint 1.1: Unable to read memory at breakpoint address.

这就是我加载图像的方式

-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView1
              cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
cellDesign* newCell = [collectionView1 dequeueReusableCellWithReuseIdentifier:@"myCell" forIndexPath:indexPath];
NSString *str = [combinedArrays[indexPath.section] objectAtIndex:indexPath.row];
newCell.templateName.text = str
newCell.displayTemplate.image = [UIImage imageNamed:str];
return newCell;
}

【问题讨论】:

    标签: objective-c ios7 memory-leaks uiimage uicollectionview


    【解决方案1】:

    这不是内存警告,您的代码运行良好,不会因为内存不足而崩溃。 此警告很可能是由某些内部 Xcode IDE 代码引起的,该代码尝试使用 LLDB 在内存地址“0x11428984c”中的某个点设置动态断点,但由于无法读取而失败。

    【讨论】:

    • 查看断点导航器...并删除不需要的断点,它对我有用。
    【解决方案2】:

    我删除了所有断点并再次运行。之后工作。

    【讨论】:

      【解决方案3】:

      我收到这个是因为我打了preconditionFailure

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-04-28
        • 2014-07-16
        • 2014-01-16
        • 2013-10-04
        • 1970-01-01
        • 1970-01-01
        • 2013-03-12
        相关资源
        最近更新 更多