Skip to content

Hi yinkou. #1

Description

@xoxoj

I found that this project will go up memory

  • (OBaconViewItem *) baconView:(OBaconView *)baconView viewForItemAtIndex:(int)index{
    static NSString *baconItemIdentifier = @"bacon.item";

    // deque baconcell
    OBCustomItem *baconItem = (OBCustomItem *)[baconView dequeueReusableItemWithIdentifier:baconItemIdentifier];

    // create new one if it's nil
    if (baconItem == nil) {
    baconItem = [[OBCustomItem alloc] initWithFrame:CGRectMake(0, 0, 150, 100)];
    }

    // fill data
    baconItem.itemLabel.text = [NSString stringWithFormat:@"%d0x BACON!", index];

    return baconItem;
    }


maybe at this line :

if (baconItem == nil) {
baconItem = [[OBCustomItem alloc] initWithFrame:CGRectMake(0, 0, 150, 100)];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions