What does +<>c mean after a class?

keliaskelias Posts: 2
edited November 19, 2015 4:42PM in ANTS Memory Profiler 8
I am profiling a WPF application and I can see a class called PriceMonitorViewModel gets cleaned up but there is another one listed as PriceMonitorViewModel+<>c.

What does the "+<>c" mean after the class name?

The class never gets cleaned up.
When I look at the class in the Instance Categorizer it tells me that it's being held by GC Roots.
I can see in the Instance List it's GC root object value is "Yes - Static Variable", which is probably why it's not getting cleaned up.

I can't seem to find any additional information on what is holding the reference. The Instance Retention Graph shows my PriceMonitorViewModel+<>c class is referenced by PriceMonitorViewModel+<>c.<>9 whatever that means.

Anything you can tell me about that suffix, and ways to get to the bottom of this apparent leak?

Comments

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi kelias,

    Thanks for your post! I believe we have a support ticket open for you, so I'm just copying over my response to this post.

    >> Regarding your query, the instance is likely compiler generated. One of our developers has explained:
    >>
    >> "For certain code the compiler needs to introduce actual constructs for things like classes, backing fields, variables etc. Examples of when this is done are: lamba functions, anonymous functions, for keywords like Async and yield.
    >>
    >> <> is used at the start of the generated construct names to avoid any collisions with "defined" code; <> is reserved for the compiler for this very purpose."
    >>
    >> I hope this information helps! Please let me know if you have any further questions.

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.