vfsfitvnm / frida-il2cpp-bridge

A Frida module to dump, trace or hijack any Il2Cpp application at runtime, without needing the global-metadata.dat file.
https://github.com/vfsfitvnm/frida-il2cpp-bridge/wiki
MIT License
974 stars 199 forks source link

How to free Il2Cpp.String #245

Closed Chensem closed 1 year ago

Chensem commented 1 year ago

My codes like below image

i wonder how to free the memory

vfsfitvnm commented 1 year ago

As far as I know, you can't free the memory of an object (I couldn't find a way to do that). When a thread gets detached from IL2CPP, its allocated memory is marked as eligible to be collected by the garbage collector.