xamarin-macios/runtime/xamarin
Rolf Bjarne Kvinge 0f59d51536 [runtime] Make sure to always dispose objects that should be disposed, even if things go wrong. (#1725)
This fixes an issue clang's static analyzer found: if an exception occured in
a call to managed code, we wouldn't process the list of objects to dispose:

    trampolines-invoke.m:549:2: warning: Potential leak of memory pointed to by 'dispose_list'
            MONO_THREAD_DETACH; // COOP: This will switch to GC_SAFE
            ^~~~~~~~~~~~~~~~~~
    ./xamarin/runtime.h:306:11: note: expanded from macro 'MONO_THREAD_DETACH'
            } while (0)
                     ^

Fix this by always processing the list of objects to dispose, even if
exceptions occur.
2017-02-20 19:29:56 +01:00
..
launch.h Build our runtime. 2016-04-24 14:47:24 -04:00
main.h [XM] Add hybrid/standard AOT option and improve AOT code (#1650) 2017-02-08 13:40:48 -06:00
runtime.h [runtime] Make sure to always dispose objects that should be disposed, even if things go wrong. (#1725) 2017-02-20 19:29:56 +01:00
trampolines.h Build our runtime. 2016-04-24 14:47:24 -04:00
xamarin.h Build our runtime. 2016-04-24 14:47:24 -04:00