Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling RNImage Sequence subsequently after a setTimeOut causes memory leak #29

Open
a4averma opened this issue Mar 12, 2019 · 1 comment

Comments

@a4averma
Copy link

Consider the following example

Screen one

class LoadingScreen extends React.Component {
  componentDidMount() {
    setTimeout(() => {
      if (this.props.hasLoggedIn && this.props.hasDevices) {
        this.props.navigation.navigate("Main");
      } else if (this.props.hasLoggedIn && !this.props.hasDevices) {
        this.props.navigation.navigate("RegisterDevice");
      } else {
        this.props.navigation.navigate("BeMain");
      }
    }, 2500);
  }
  render() {
    return (
        <View style={styles.container}>
          <ImageSequence
            images={images}
            startFrameIndex={0}
            style={{
              width: 200,
              height: 200,
              alignSelf: "center"
            }}
          />
          <Spinner />
        </View>
    );
  }
}

Screen Two

export default class MainScreen extends React.Component {
  render() {
    return (
        <View style={styles.container}>
          <ImageSequence
            images={images}
            startFrameIndex={0}
            style={{ width: 150, height: 150 }}
          />
    );
  }
}

This causes a crash in signed release variant of the app. Debug app seems to work fine. How do I resolve this?

@a4averma a4averma changed the title Calling this subsequently after a setTimeOut causes memory leak Calling RNImage Sequence subsequently after a setTimeOut causes memory leak Mar 12, 2019
@madsleejensen
Copy link
Owner

Hi could you attach the error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants