[Mono-list] Fwd: Threading and IO problem
cdhowie at gmail.com
Sun Mar 9 07:47:31 EDT 2008
On Fri, Mar 7, 2008 at 1:45 PM, Yanko Hernández Álvarez
<yhdezalvarez at gmail.com> 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.
More information about the Mono-list