Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix YogaConfig getting garbage collected facebook#1678 (facebook#46651)
Summary: Pull Request resolved: facebook#46651 Fixes [https://github.com/facebook/yoga/issues/1678](https://github.com/facebook/yoga/issues/1678) As described in the linked Issue, the problem is that the `YogaConfig` can get garbage collected by the JVM, while a `YogaNode` is still referring to it. This at some point leads to unexpected behaviour (0 values for `layoutWidth`/`layoutHeight`). The change coming with this PR makes sure the `YogaConfig` can not get garbage collected while it's used by a `YogaNode`. Demo project to confirm the fix https://github.com/michaeltroger/yogabug Kudos to rtPag, who helped identifying the issue. X-link: facebook/yoga#1703 Reviewed By: mdvacca Differential Revision: D63416127 Pulled By: NickGerleman fbshipit-source-id: efd87dac897e44d3664c228c40cda90f1e11c4f6
- Loading branch information