[Mono-list] crash in mono_jit_cleanup

jonathan at mugginsoft.com jonathan at mugginsoft.com
Mon Nov 18 14:16:42 UTC 2013


On 17 Nov 2013, at 22:05, Robert Jordan <robertj at gmx.net> wrote:

> On 16.11.2013 17:26, jonathan at mugginsoft.com wrote:
>> My work around is to not call mono_jit_cleanup() at all.
>> 
>> I terminate Mono when I terminate my app so I presume that nothing untoward can occur.
> 
> If your app is depending on finalizers being executed at shutdown,
> then in place of mono_jit_cleanup() you should call a managed method
> that triggers a collection as a workaround:
> 
> GC.Collect ();
> GC.WaitForPendingFinalizers();
Calling the finalisers this way seems like a reasonable idea and allows the app to terminate cleanly.

https://github.com/ThesaurusSoftware/Dubrovnik/blob/master/Framework/XCode/DBMonoEnvironment.m#L333

Jonathan


More information about the Mono-list mailing list