Re: [Ikvm-developers] SoftReference
Brought to you by:
jfrijters
From: Paolo M. <lu...@xi...> - 2006-03-10 14:45:44
|
On 03/09/06 Jeroen Frijters wrote: > There is another GC feature that would be a little higher priority for > me and that is support for "reference queues". Java has a feature where > you can be notified when a weak reference is cleared by the VM. The GC > posts the reference object into a queue after it clears it. At the > moment the implementation of this feature in IKVM is very inefficient > (basically uses sentinel objects that check the weak reference every > time the sentinel gets finalized). > > Of course, it would be especially nice if these features could be added > in the context of the ECMA process as well :-) In mono/.net I guess we'd have to queue GCHandles instead of WeakReference objects: would that work for you? Also: how do you think the API should look like in C#? How is the access to this queue regulated for different subsystems? Who removes the entries from this queue? Are all the handles posted or just the ones that are specially registered? Maybe we want an event where the users can register a delegate? delegate void ZeroedHandles (GCHandle[]); lupus -- ----------------------------------------------------------------- lu...@de... debian/rules lu...@xi... Monkeys do it better |