On Fri, Mar 7, 2008 at 1:45 PM, Yanko Hernández Álvarez <[EMAIL PROTECTED]> wrote: > OTOH and as a curiosity: Is there any way to free memory directly (at > CIL level I mean) without using the GC? for instance: > > > while ((Str = SR.ReadLine()) != null) ; > > with a little flow analisis we can determine Str isn't used after it > is assigned. is there a way to deallocate it efficiently without > waiting for the GC to collect memory?
This would also have to be determined for the ReadLine() method (making sure it doesn't stash a reference somewhere) as well as any methods that ReadLine() passes that string reference to (which may be none, but you get my point). I have often wished for the same thing, but implementing it is considerably more complicated than it looks. -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
