Merge pull request #1674 from alexanderkyte/gdb_support
[mono.git] / mono / metadata / image.c
index 7068e026c6c1090f8c4555670b2af75484a09e06..1e9596cff5d1b321602945115e868ffdb90d2a83 100644 (file)
@@ -932,12 +932,17 @@ static MonoImage *
 do_mono_image_load (MonoImage *image, MonoImageOpenStatus *status,
                    gboolean care_about_cli, gboolean care_about_pecoff)
 {
+       MonoCLIImageInfo *iinfo;
+       MonoDotNetHeader *header;
        GSList *errors = NULL;
 
        mono_profiler_module_event (image, MONO_PROFILE_START_LOAD);
 
        mono_image_init (image);
 
+       iinfo = image->image_info;
+       header = &iinfo->cli_header;
+               
        if (status)
                *status = MONO_IMAGE_IMAGE_INVALID;
 
@@ -1604,6 +1609,9 @@ mono_image_close_except_pools (MonoImage *image)
        }
 
        free_hash (image->native_wrapper_cache);
+       free_hash (image->native_wrapper_aot_cache);
+       free_hash (image->native_wrapper_check_cache);
+       free_hash (image->native_wrapper_aot_check_cache);
        free_hash (image->native_func_wrapper_cache);
        free_hash (image->managed_wrapper_cache);
        free_hash (image->delegate_begin_invoke_cache);