'Example usage of the releaseNativeCounterpart function in JS/TS
I have built a NativeScript Angular app. The app has gotten a little bigger in usage and it uses a lot of memory at a point. I am trying to free up some space manually. I found this good article on NativeScript's official website and trying to implement it but there is very little information about it out there.
The code I am trying to implement is at the very end of the article and goes as follows:
const heavyNativeObject = new com.native.HeavyObject();
releaseNativeCounterpart(heavyNativeObject); // all usages of heavyNativeObject after this line would have undefined behaviour
I am trying to run this piece of code but the article does not say where to put this code. I tried various places but it did not work.
Any kind of information should be helpful. If not this, are there any other ideal ways to clear up memory in NativeScript Angular app (preferably on iOS platform) without any damage to the performance.
Thanks in Advance :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
