On Fri, Dec 18, 2009 at 6:46 PM, John Cowan <[email protected]> wrote:
>> That's what we do now, but I'd like to just rip that code completely
>> out so we don't have to check a flag "should I add myself or not".
>
> The WeakSet should do that for you, no?  That's the point of sets.
>
> Set<E> weakSet = Collections.newSetFromMap(WeakHashMap<E, Boolean>();

That's not quite what I meant...I meant we already have logic in JRuby
to avoid adding transient object constructions to ObjectSpace, so all
other constructions have to check a flag to know they should add
themselves. If we could rely entirely on JDI (or similar) for
ObjectSpace, we would just remove that flag check entirely.

- Charlie

--

You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.


Reply via email to