mono / website

Mono's web site.
MIT License
354 stars 782 forks source link

Documentation clarification of mono_method_desc_new #613

Open mickeyordog opened 1 year ago

mickeyordog commented 1 year ago

Hi, I'd like to request that either this is clarified in the documentation. On this page here, it mentions that you can pass e.g. “System.Object:GetHashCode()” into mono_method_desc_new() to help you search for a method. I think it would be helpful to clarify that you also need to specify what arguments the function takes. For example, if this function took an int parameter, it would need to say “System.Object:GetHashCode(int)”. A lot of the info at the top of here should probably also be mentioned. In particular the fact that floats need to be written as "single" to find the correct method.

I also think it should be mentioned that mono_method_desc_new() allocates memory and needs to be freed with mono_method_desc_free(). I'm unsure if mono_jit_cleanup () will automatically get rid of allocated mono memory and would appreciate this being cleared up.

akoeplinger commented 1 year ago

We'd be happy to accept a pull request which improves the page, you can do so by clicking on the Edit page on GitHub link at the top of the page which will take you to the source: https://github.com/mono/website/blob/gh-pages/docs/advanced/embedding/index.md