[corlib] Versioning from reference sources
[mono.git] / mono / metadata / image.c
index 7068e026c6c1090f8c4555670b2af75484a09e06..efea4081e219c6b345041d8c1cadaf48ee8ab75d 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);
@@ -1634,8 +1642,9 @@ mono_image_close_except_pools (MonoImage *image)
        free_hash (image->thunk_invoke_cache);
        free_hash (image->var_cache_slow);
        free_hash (image->mvar_cache_slow);
+       free_hash (image->var_cache_constrained);
+       free_hash (image->mvar_cache_constrained);
        free_hash (image->wrapper_param_names);
-       free_hash (image->native_wrapper_aot_cache);
        free_hash (image->pinvoke_scopes);
        free_hash (image->pinvoke_scope_filenames);
        for (i = 0; i < image->gshared_types_len; ++i)