G
Guest
Hi everyone,
I have a long-running application (sits in the system tray waiting for
something to do and interacts with the user via form and some hardware)
containing an object (a reference to the aforementioned hardware and its
associated functionality) that occasionally will become 'nothing' i.e. when I
attempt to access it after a period of time, I get a null reference exception.
I couldn't find a path in my code that releases the object unintentionally,
so I was wondering if there was a way to tell if the garbage collector
released it or what. This object implements IDisposable because it contains
some unmanaged resources- it wraps a device driver- but I haven't had any
luck in finding out what chunk of code called Dispose.
Any suggestions that would help me troubleshoot this problem? I'd really
appreciate it.
I have a long-running application (sits in the system tray waiting for
something to do and interacts with the user via form and some hardware)
containing an object (a reference to the aforementioned hardware and its
associated functionality) that occasionally will become 'nothing' i.e. when I
attempt to access it after a period of time, I get a null reference exception.
I couldn't find a path in my code that releases the object unintentionally,
so I was wondering if there was a way to tell if the garbage collector
released it or what. This object implements IDisposable because it contains
some unmanaged resources- it wraps a device driver- but I haven't had any
luck in finding out what chunk of code called Dispose.
Any suggestions that would help me troubleshoot this problem? I'd really
appreciate it.