urho
urho copied to clipboard
Destruction of objects
Currently every finalizer queues an execution on the main thread of the unrefing of the object, we should instead queue all of these in a batch, and then dispose those in one go.
InvokeOnMain actually adds an action to a list of actions to execute and once the next frame appears - it does foreach over the list and executes all the actions. The only way to optimize it is to do a single pinovoke DeleteNative(IntPtr[]) instead of multiple DeleteNative(IntPtr)