Is there a way to gain access to managed references list then?
What I need to do is to allow an object to know when all reference to it are
gone.
The core of the problem is Async IO & Garbage collection; if a socket or a
network stream initiated Async io call, until it completes Garbage collector
will ignore it. Which makes it very problematic for objects with lost
references.
I.E. If i loose a reference to an object (or object tree) which is utilizing
IOCP, there is no way for me to get the object closed other then kill the
process.
If I were to have access to references to a particular object (socket in my
case) then I would be able to check them periodically, and if refrence is
lost I can initiate a call to socket shutdown.
I suspect any device bound to an operating system handle will experience the
same issue.
> > Does anyone know of a way to gain access to runtime's reference counters?
> > GC
[quoted text clipped - 5 lines]
>
> Willy.
Lloyd Dupont - 12 May 2005 00:35 GMT
I don't get you..
why do you lost the reference? what do you mean?
if you want to keep track of this socket and close it eventually, why don't
you create a reference to it?
or if there is heaps of them a colection with some time information?
also socket have a timeout, I believe, and you could change it
programatically...
> Is there a way to gain access to managed references list then?
> What I need to do is to allow an object to know when all reference to it
[quoted text clipped - 30 lines]
>>
>> Willy.