| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
The one of the existing tests failed with: JS: Test: --- [UTILS.test_releaseNativeObject_canBeCalledWithNativeObject] FAILED: __releaseNativeCounterpart is not defined, Stack: ReferenceError: __releaseNativeCounterpart is not definedI don't think I caused it, but cannot check the "All existing tests are passing:"-box. |
Sorry, something went wrong.
There was a problem hiding this comment.
I would suggest to just use a WeakRef for the owner so that we don't have to worry about when and if we should clear it up. We do this in many other cases when there is a Listener or Handler object that is just used for a native callback (like here)
Sorry, something went wrong.
|
Hi @vakrilov That was something I wondered when I reported the issue. On iOS tns-core-modules uses a WeakRef for the owner references, but most cases I've seen for Android don't use a WeakRef for the same. NativeScript/tns-core-modules/ui/action-bar/action-bar.android.ts Lines 39 to 53 in 23147ae That was why I choose not to use one. I'll update my PR as requested. |
Sorry, something went wrong.
|
test |
Sorry, something went wrong.
|
test |
Sorry, something went wrong.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Checklist
What is the current behavior?
The TouchListener added to View on android have a owner-reference that is never cleared like it is on other native classes like the clickListener in button.android.ts.
So the TouchListener and View will keep pointing to each other as seen in #6913.
What is the new behavior?
Like on clickListener in button.android.ts owner is bound to the touchListener when onLoaded is called and removed again when onUnloaded is called.
Fixes #6913