Patch: String.unintern

Corey Minyard minyard@acm.org
Wed Jan 24 21:02:00 GMT 2001


First a little thing: Comparing the value after UNMASK_PTR is called
with DELETED_STRING is not going to work, since UNMASK_PTR always
loses the lower bit and DELETED_STRING has it set.

Now a more fundamental issue.  Does registering a new finalizer or
calling a finalizer automatically resurrect the object so the new
finalizer will be called?  I looked in the GC code and I really
couldn't tell.  I think it does this, but I'm not sure.  If not, and
no references to the object exist, the newly registered finalizer
won't be called, the object will be collected, but it will remain in
the strhash table.

-Corey

Tom Tromey <tromey@redhat.com> writes:
> I've written a patch that, I think, makes uninterning of Strings work.
> 
> Last time we talked about this it turned out there were some ways to
> make libgcj crash if uninterning was enabled.  Does anybody have a
> test program that used to do this?  I can't make it happen, but that
> doesn't mean this patch is correct...
> 
> I don't want to check it in until someone else looks at it.
> 


More information about the Java-patches mailing list