Will React Native input’s text available in a RAM memory dump be garbage collected at some point? How long would that take?

Long story short, I need to confirm that text written inside some inputs would eventually be cleared from the RAM memory so that it can’t be accessed through a memory dump. From what I understand, since I’m using a high level programming language, I can’t manually manipulate the memory and rely entirely on the garbage collector.

I am using frida server and fridump to create the RAM dump and I’m testing on Android right now.

Now I am wondering how long must I wait before the strings in the memory get garbage collected? I am creating the memory dump after the Stack that contains the input fields gets unmounted, so I imagine that they should be eligible for deletion at that point.

That being said, I’ve waited a long time inbetween dumps while the application is running, and it seems that the strings are not being removed from memory.