devsunnysideup
New member
Hello Opsive team,
I am the engineer responsible for optimization in our company.
I am currently investigating issues where native wrapper instances for the managed shell fail to unload because instances in the managed shell are referencing native instances. (referred to as
Leaked Managed Shell, will called LMS after of it)
During recent memory profiling, I discovered that resources present in the game and some dedicated type instances remained persistently in memory. Investigating these, I identified that static members of [Opsive.Shared.Events.EventHandler] and [Opsive.Shared.Utility.GenericObjectPool] were causing LMS.

Our project uses these to receive events emitted from [Opsive.Shared.Events.EventHandler] and calls [UnregisterEvent] to clean them up when they are destroyed(freed).
However, we discovered that LMS is generated because cache instances used in [GenericObjectPool] and similar static members do not perform null assignment when returned.
All this logic resides in precompiled DLLs. (Opsive.Shared.*.dll)
So, to address this on our end, we must either modify 'all' code using these features in assets, or, decompile it, insert logic to handle this issue, and recompile for use.
We want to resolve this issue.
I am the engineer responsible for optimization in our company.
I am currently investigating issues where native wrapper instances for the managed shell fail to unload because instances in the managed shell are referencing native instances. (referred to as
During recent memory profiling, I discovered that resources present in the game and some dedicated type instances remained persistently in memory. Investigating these, I identified that static members of [Opsive.Shared.Events.EventHandler] and [Opsive.Shared.Utility.GenericObjectPool] were causing LMS.

Our project uses these to receive events emitted from [Opsive.Shared.Events.EventHandler] and calls [UnregisterEvent] to clean them up when they are destroyed(freed).
However, we discovered that LMS is generated because cache instances used in [GenericObjectPool] and similar static members do not perform null assignment when returned.
All this logic resides in precompiled DLLs. (Opsive.Shared.*.dll)
So, to address this on our end, we must either modify 'all' code using these features in assets, or, decompile it, insert logic to handle this issue, and recompile for use.
We want to resolve this issue.

