Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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
Developer Community or GitHub 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.
Created attachment 14218 [details]
Trace and sample project
While debugging the application with the Xamarin Profiler I came across a strange issue.
When ever I create a Generic List<SOMECLASS>, mono creates a wrapper object for this object which ends up creating an array of that type.
While disposing, I can see that the Generic List is completely dropped, however this array created by the wrapper is not.
I am not sure if this is an intended behavior but all different list types that are created add a new instance of this wrapper which in turn create the array and leaves it in memory.
In attach is the sample project and the trace from profiler
I'm a bit confused about what the issue is here.
The title of this bug refers to __icall_wrapper_mono_array_new_specific which is not a class. It's an internal wrapper method generated by the JIT compiler to invoke a native function in the Mono runtime. There's nothing unusual about this method being generated.
You mention that you're seeing a wrapper object for List<T> but I'm not sure what you mean by that. List<T> certainly creates an internal array for the actual elements in the list, but that's about it.
I need more information to be able to help here. Basically, it's not clear to me what you're seeing versus what you're expecting, since you're talking about objects but also an icall wrapper method (which is only JIT'd once) and the two seem to have no relation.
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!