🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ensuring CriticalSections are release..

#713
From: Dennis Jones
Date: Tue, 15 Jan 2008 07:17
26 lines
2506 bytes
"Clayton Arends" <nospam_claytonarends@hotmail.com> wrote in message 
news:478c5a53$1@newsgroups.borland.com...
> "Dennis Jones" <nospam@nospam.com> wrote in message 
> news:478c17ad$2@newsgroups.borland.com...
>
>> "Bob Gonder" <notbg@notmindspring.invalid> wrote in message 
>> news:e45oo3tf9dfrtlm8udetauha7jp5s4glam@4ax.com...
>>> If the creation is a function, then that
>>> negates the uselessness test.
>>
>> Not sure what you are getting at here, Bob.
>
> I think the uselessness test applies even if the class was created without 
> a function.  The nature of classes is that they can do anything on 
> construction and anything on destruction.  This simple fact means that the 
> compiler cannot reliably know if the variable has no practical use.

Okay, I think I see what you mean.  If the object is of some class with a 
destructor, then the object *will* be used, even if it is not explicitly 
used in the code.  So, if the compiler generates the warning sometimes but 
not others, then I agree that the compiler may be deficient in its 
evaluation of cases where the warning is appropriate (I don't think I would 
go so far as to call it a bug though).

- Dennis 
Technical Details
Message-ID: <478c5e02$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!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> <478c17ad$2@newsgroups.borland.com> <478c5a53$1@newsgroups.borland.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> <478c17ad$2@newsgroups.borland.com> <478c5a53$1@newsgroups.borland.com>
Subject: Re: ensuring CriticalSections are release..
Date: Mon, 14 Jan 2008 23:17:25 -0800
Lines: 28
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; Response
NNTP-Posting-Host: 71.245.109.58
Message-ID: <478c5e02$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1200381442 71.245.109.58 (14 Jan 2008 23:17:22 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail