haritha-mohan / MemLeak

command line tool that detects memory leaks via the presence of strongly connected components in an application's heap
https://www.nuget.org/packages/MemLeak
1 stars 0 forks source link

RCW & CCW in Mono #3

Closed haritha-mohan closed 1 year ago

haritha-mohan commented 1 year ago

RCW/CCWs provide the edge info, there should be a similar concept in Mono.

Need to investigate this and figure out implementation details. Will help filter output and narrow scope of detected cycles.

haritha-mohan commented 1 year ago

Update (from Johan): rcw/ccw wrappers are mainly to track windows specific COM or WinRT objects, so the majority of use cases they represent are not present on Mono or on none Windows platforms. We report all roots reported by GC and if we don't have any specific classification of the root we will report it as "other handles", so all roots reported by GC are in the dump. If there is any need to get more details if a specific object is bridged or not, then I believe we could potentially do something around that, when we report an object there are additional checks we could perform and emit slightly different data based on results.