🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #809

Re: ensuring CriticalSections are release..

#809
From: Dennis Jones
Date: Tue, 15 Jan 2008 02:17
17 lines
1887 bytes
"Bob Gonder" <notbg@notmindspring.invalid> wrote in message 
news:e45oo3tf9dfrtlm8udetauha7jp5s4glam@4ax.com...
> Dennis Jones wrote:
>
>>What I don't understand, I guess, is why one
>>would expect it NOT to generate a warning.
>
> If the creation is a function, then that
> negates the uselessness test.

Not sure what you are getting at here, Bob.  A ScopeGuard object is created 
and assigned to a variable; that variable is never used (not directly 
anyway) after the assignment, and that's what triggers the warning.  Using 
the variable (to Dismiss() the guard, for example) obviates the warning.

- Dennis 
Technical Details
Message-ID: <478c17ad$2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <478a96e3@newsgroups.borland.com> <478b0076$1@newsgroups.borland.com> <478bac9a$1@newsgroups.borland.com> <478bba5f$1@newsgroups.borland.com> <478be3e4$1@newsgroups.borland.com> <478bf841$1@newsgroups.borland.com> <478c08c8$1@newsgroups.borland.com> <e45oo3tf9dfrtlm8udetauha7jp5s4glam@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,266d339b0fd4ba38
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Dennis Jones" <nospam@nospam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <478a96e3@newsgroups.borland.com> <478b0076$1@newsgroups.borland.com> <478bac9a$1@newsgroups.borland.com> <478bba5f$1@newsgroups.borland.com> <478be3e4$1@newsgroups.borland.com> <478bf841$1@newsgroups.borland.com> <478c08c8$1@newsgroups.borland.com> <e45oo3tf9dfrtlm8udetauha7jp5s4glam@4ax.com>
Subject: Re: ensuring CriticalSections are release..
Date: Mon, 14 Jan 2008 18:17:19 -0800
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 71.245.109.58
Message-ID: <478c17ad$2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1200363437 71.245.109.58 (14 Jan 2008 18:17:17 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail