dotmemory dump analysis

Hello,
currently I am using Jet brains dot memory 2017.3.2. In this tool we have a feature to import dump (beta). While analyzing a dump of our application we found,
--> it was using 3.27 GB of memory.
--> One of the CLASS A object was retaining around 3GB of memory.
--> CLASS A contains an event named PropertyChanged.
--> when we took the dump we saw around 29780 subscribers are subscribed to PropertyChanged event.
--> expanding the invocationlist of the event showed, few EventHandlers retained 64 bytes of memory.
Here comes my confusion,
If you expand any of the event handler (which consumes 64 bytes) you can see the target object (subscriber) retained ~121 KB of memory. 
isn't it showing wrong? 

3 comments
Comment actions Permalink

Hello,

It's expected behavior because Outgoing References view shows all references from object instance but "Retained size" is the overall size in bytes of all objects exclusively retained by a certain instance. You can check it if you open SiriusIntellisenceListCreator instance and open "Key Retention Paths" view, for example:

EventHandler has the reference to AppWorkspace type by _target field but it doesn't exclusively retain AppWorkspace type. If EventHandler instance is collected by GC, AppWorkspace will be remained in memory because it'll be still retained by other objects.

0
Comment actions Permalink

Please use this button to open objects retained by certain instance:

0
Comment actions Permalink

Understood. thanks a lot Anna. 

0

Please sign in to leave a comment.