Re: win32 design patterns
- From: "Alex Blekhman" <tkfx.REMOVE@xxxxxxxxx>
- Date: Wed, 5 Mar 2008 17:53:36 +0200
"Ben Voigt [C++ MVP]" wrote:
[...] This non-deterministic cleanup creates a race condition.
An alternate example is, since the GC is triggered by memory
pressure, a database connection pool could be exhausted by
unreachable objects waiting to be finalized, but the GC will not
run because it doesn't know that resources are scarce and a
collection is needed.
That's why C# provides `using' statement. It is equivalent to
C++'s RAII. After all, .NET programs have orders of magnitude
fewer leaks than comparable native programs.
Alex
.
- Follow-Ups:
- Re: win32 design patterns
- From: Ben Voigt [C++ MVP]
- Re: win32 design patterns
- References:
- Re: win32 design patterns
- From: Giovanni Dicanio
- Re: win32 design patterns
- From: Alf P. Steinbach
- Re: win32 design patterns
- From: Tamas Demjen
- Re: win32 design patterns
- From: Alex Blekhman
- Re: win32 design patterns
- From: Ben Voigt [C++ MVP]
- Re: win32 design patterns
- From: Giovanni Dicanio
- Re: win32 design patterns
- From: Ben Voigt [C++ MVP]
- Re: win32 design patterns
- Prev by Date: Re: difference in VC 6 and vc 2008 in "for block"
- Next by Date: Re: difference in VC 6 and vc 2008 in "for block"
- Previous by thread: Re: win32 design patterns
- Next by thread: Re: win32 design patterns
- Index(es):