[Mono-dev] mono_debug_close_image bug

Joachim Ante joe at otee.dk
Wed Sep 12 17:24:01 EDT 2007


Hi,

In mono_debug_close_image:
g_hash_table_remove (mono_debug_handles, handle);

g_hash_table_remove should be passed the image and not the handle.
Right now this leads to nothing being removed from the hash and thus  
leaking images and symbol files.

Should be:
g_hash_table_remove (mono_debug_handles, image);

Best regards,
Joachim Ante

----

void
mono_debug_close_image (MonoImage *image)
{
         MonoDebugHandle *handle;

         if (!mono_debug_initialized)
                 return;

         handle = _mono_debug_get_image (image);
         if (!handle)
                 return;

         mono_debugger_lock ();

         mono_debugger_event (MONO_DEBUGGER_EVENT_UNLOAD_MODULE,  
(guint64) (gsize) handle,
                              handle->index);

         mono_debug_list_remove (&mono_symbol_table->symbol_files,  
handle);
         g_hash_table_remove (mono_debug_handles, handle);

         mono_debugger_unlock ();
}




More information about the Mono-devel-list mailing list