gre / react-native-view-shot

Snapshot a React Native view and save it to an image
https://github.com/gre/react-native-view-shot-example
MIT License
2.66k stars 346 forks source link

Simplify Android background thread #472

Closed msafutin closed 1 year ago

msafutin commented 1 year ago

As the capture task is executed once, a simple thread can be used for running it instead of a handler. This way the thread stops on task completion and the ViewShot object can be GC'd rather than persisting until the host is destroyed. The hanging threads could make an app run out of memory and crash after continuous use