Re: About speed
- From: "Joanna Carter [TeamB]" <joanna@xxxxxxxxxxxx>
- Date: Sat, 24 Jun 2006 23:34:34 +0100
"Bryce K. Nielsen" <bryce@xxxxxxxxxxx> a écrit dans le message de news:
449d9bff$1@xxxxxxxxxxxxxxxxxxxxxxxxx
| Memory. Even with GC you still need to behave responsibly with your
memory.
| I use "using()" all the time (which "frees" it in Delphi-way-of-thinking,
| Dispose() for you DotNetters) but even then I see strange behaviors from
| time to time.
No, Dispose() doesn't free memory, it only releases resources on instances
of classes that support IDisposable.
You cannot free objects explicitly, you can only set the last reference to
nil and then let the GC clear it up when it is ready. Forcing GC is
inefficient and not advised.
Using "using" will not free objects, it will only call Dispose() if the
object supports IDisposable, which is only needed to release resources.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer
.
- Follow-Ups:
- Re: About speed
- From: Ingvar Nilsen
- Re: About speed
- References:
- About speed
- From: alavna
- Re: About speed
- From: Árpád Soós
- Re: About speed
- From: Oliver Townshend
- Re: About speed
- From: Don Strenczewilk
- Re: About speed
- From: Bryce K. Nielsen
- Re: About speed
- From: Craig Stuntz [TeamB]
- Re: About speed
- From: Bryce K. Nielsen
- Re: About speed
- From: Ingvar Nilsen
- Re: About speed
- From: Bryce K. Nielsen
- Re: About speed
- From: Ingvar Nilsen
- Re: About speed
- From: Bryce K. Nielsen
- About speed
- Prev by Date: Re: About speed
- Next by Date: Re: About speed
- Previous by thread: Re: About speed
- Next by thread: Re: About speed
- Index(es):
Relevant Pages
|
|