On Fri, Dec 18, 2009 at 7:31 PM, Charles Oliver Nutter <[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>(); > And > the weakref method means you have n * <ruby object count> extra > objects in memory, along with the tremendous perf hit of constructing > a weakref for every ruby object construction. That is annoying. Unfortunately, Reference is magic: you cannot give ordinary classes the ref nature. > > In the end, this is too slow, so it's only an interesting JDI hack. > But it's cute :) > > I may look into a JVMTI version instead, since it would be a lot > closer to the metal and we may be able to bind the JNI methods > dynamically using JRuby's FFI layer. > > - 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. > > > -- GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures -- 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.
