BepInEx / Il2CppInterop

A tool interoperate between CoreCLR and Il2Cpp at runtime
GNU Lesser General Public License v3.0
185 stars 59 forks source link

Pool objects created when passing objects from generated assemblies to the user #92

Closed simonkellly closed 1 year ago

simonkellly commented 1 year ago

This essentially stops the massive memory usage which occurs as a result of creating a brand new wrapper object every time you call a method/field/property from any of the generated assemblies.

Alexejhero commented 1 year ago

Could we get this PR merged soon? 😃

simonkellly commented 1 year ago

AFAIK this is ready to go, lmk if changes are required

simonkellly commented 1 year ago

I have made the changes,

Some of the objects remain in the cache as their finalizer doesnt run, but forcing the GC to run tends to remove a chunk of them so I don't think it is much of an issue

Wael1231 commented 1 year ago

Could we get this PR merged soon please? 😃

Alexejhero commented 1 year ago

Is there anything that still needs to be done before merging this pull request? I have a mod release that is waiting on these changes. 😊