[Mono-list] Re: bug report for new JIT

dietmar dietmar@ximian.com
09 Apr 2003 16:30:39 +0200


On Wed, 2003-04-09 at 16:10, Jeroen Frijters wrote:
> Another thing to consider is garbage collection. Hopefully the intern
> table has weak references to the strings that the user put in there, but
> strings put in there by ldstr shouldn't be gargbage collected (except
> when the AppDomain unloads).
> 
> Imagine what happens if:
> 
> > 	mono_ldstr (...);
> > 	mono_ldstr (...);
> > 	... repeat for each string in the switch ...
> *GC happens (because of another thread)*
> > 	check isinterned
> 
> If the ldstr strings were garbage collected the isinterned check would
> fail.

Interned strings are not collected because we store them inside a hash
table which holds a reference.

- Dietmar