Bug 21994 - Memory leaks in Dictionary with struct
Summary: Memory leaks in Dictionary with struct
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: 3.0.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2014-08-11 10:04 UTC by Alexandre Pepin
Modified: 2014-08-13 14:11 UTC (History)
5 users (show)

Is this bug a regression?: ---
Last known good build:

Sample project (22 bytes, application/zip)
2014-08-11 10:04 UTC, Alexandre Pepin
Instruments trace (3.88 MB, application/zip)
2014-08-11 10:04 UTC, Alexandre Pepin
Working sample project (13.83 KB, application/zip)
2014-08-13 08:14 UTC, Alexandre Pepin

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Alexandre Pepin 2014-08-11 10:04:15 UTC
Created attachment 7654 [details]
Sample project

I have a memory leak when using a dictionary that has a struct as the key.

See attached project to reproduce and attached Instruments analysis
Comment 1 Alexandre Pepin 2014-08-11 10:04:48 UTC
Created attachment 7655 [details]
Instruments trace
Comment 2 Zoltan Varga 2014-08-12 20:35:23 UTC
The sample project zip file seems to be corrupt/empty.
Comment 3 Alexandre Pepin 2014-08-13 08:14:00 UTC
Created attachment 7673 [details]
Working sample project

My bad. Here's the sample project
Comment 4 Zoltan Varga 2014-08-13 14:11:03 UTC
Fixed in mono master a4f96bc5715ef95b67c4c67d6c545c3b66664586.
The will be in a future x.ios release. These leaks were bounded, so they were mostly harmless.