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

修正内存池对象在进行Destroy时没有解除jsbinding 的问题 #1263

Closed
wants to merge 1 commit into from

Conversation

zqxiaojin
Copy link

出现问题是iOS平台,在开发时发现 Fixture对象由于使用了内存池,符合以下条件的话,则出现问题:
1、当Fixture在native端回收,但JSValue没有解除绑定
2、旧的Fixture的地址被新的Fixture使用再绑定到新的JSValue上
3、当旧的 JSValue 被 JSC 进行gc,其JSBinding也被解除,波及了 新的Fixture对象。导致binding消失。

故通过在对其进行回收时,主动调用clearPrivateData进行解除binding.

详见 http://forum.cocos.com/t/undefined-is-not-an-object-evaluating-colliderb-body/60184/12?u=lucky_06

@dumganhar
Copy link
Contributor

谢谢提交PR,但是这个 PR 挺 Hack的,我稍后会提交一个新的PR修复这个问题。

@dumganhar dumganhar closed this May 24, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants