kfiroo / react-native-cached-image

CachedImage component for react-native
MIT License
940 stars 468 forks source link

terminating due to memory issue #120

Open shamimshahcheraghi opened 6 years ago

shamimshahcheraghi commented 6 years ago

Im using native base list to render CachedImage, it crashed on iPhone 5 when I load more row, I tested in debug and release mode but It crashes on both with this error "Terminating due to memory issue" any idea ??

<List onLayout={(event) => this.measureView(event)} dataArray={this.state.posts}
                      renderRow={(item) =>
                          <ListItem key={item.post_id}>
                                 <CachedImage source={{uri:this.props.post.img }}/>
                          </ListItem>
                      }
                >
                </List>
maneeshprajapati commented 6 years ago

I am also facing same error in iOS devices. App crashes randomly with the message. Any solution for this?

maneeshprajapati commented 6 years ago

My app was crashing because of bad memory management at my end. A view was being pushed multiple times on self, so it was loading same cache image instance again and again. I resolved it by application screens flow improvement.

chrusart commented 6 years ago

@maneeshprajapati close issue then please