Finding References to Ojbect IDs created with "Make Object ID"
once object id assigned, there straight forward way of locating all active references?
for example, label object object id while in debugger and continue. later, i hit a different breakpoint instance of unrelated object. there a way while @ later breakpoint find occurrences of object labeled earlier?
i'm trying hunt down an objectdisposedexception in code didn't write , such feature useful. conceptually, information needed can provided garbage collector; return list of objects reference labeled object , ide allow inspect them interactively. implemented or more complicated that?
thanks!
as tracking down problem in tough situation. if getting above exception have .net equivalent of null reference. unfortunately there no easy way debug this. won't notification when gc decides object free. have no control on when gc runs there isn't place put breakpoint. if have access control source (or if derives framework object implements idisposable) set breakpoint there. lets know when object freed. doesn't know when references object released. need know when object thought being referenced no longer is. gc doesn't calculation until runs.
i recommend start code getting ode. code should know object should around no longer is. there can find references object , verify instance being kept around somewhere. if helps unmanaged code common place ode occurs because unmanaged code doesn't count reference object.
michael taylor - 7/29/08
http://p3net.mvps.org
Archived Forums V > Visual C# IDE
Comments
Post a Comment