Re: Best practice using large objects in foreach
- From: "Laura T" <laura.t@xxxxxxxxxx>
- Date: Thu, 27 Jul 2006 18:00:42 +0200
Yes. The C version is the correct way.
I dont't think there would be no halt because the objects remain in gen1.
And on the server side GC is concurrent.
But yes, it's (almost) always imperative to Dispose() as fast as you can.
"Marc Gravell" <marc.gravell@xxxxxxxxx> ha scritto nel messaggio
news:1154013700.784036.269770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
No; C is /vastly/ more efficient overall, as the memory footprint is
minimised during processing due to early disposal. In A & B this is
performed by the GC, so you will see (for a large set) the memory usage
ramp for a while, then processing grind to a halt as the GC tears down
the improperly discarded images, and then the memory start ramping up
again. I would anticipate C to stay fairly constant both in terms of
memory footprint and processing rate, and it will put much less stress
on the rest of the system - important in a server environment.
Marc
.
- References:
- Best practice using large objects in foreach
- From: Benny
- Re: Best practice using large objects in foreach
- From: Laura T
- Re: Best practice using large objects in foreach
- From: Marc Gravell
- Best practice using large objects in foreach
- Prev by Date: Re: Aligning controls with each other at runtime
- Next by Date: Re: multiple splitter controls
- Previous by thread: Re: Best practice using large objects in foreach
- Next by thread: Re: Best practice using large objects in foreach
- Index(es):
Relevant Pages
|