🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ensuring CriticalSections are release..

#803
From: Clayton Arends
Date: Mon, 14 Jan 2008 19:38
22 lines
2102 bytes
"Clayton Arends" <nospam_claytonarends@hotmail.com> wrote in message 
news:478bac9a$1@newsgroups.borland.com...

> I have one itty bitty problem with using this approach.  I haven't looked 
> closely enough yet to see why it's happening.

Well, I dug a little deeper.  If I use ScopeGuardImpl1 (for example) 
directly rather than using the MakeGuard() function then I can avoid the 
warning:

  ScopeGuardImpl1<void (*)(char*), char*> auto_a =
    ScopeGuardImpl1<void (*)(char*), char*>::MakeGuard(&DeleteIt, a);

The warning is most likely caused by the trick ScopeGuard uses to 
circumnavigate the need for a virtual destructor.  Also Builder is probably 
not correctly hiding the warning like it does for the standard RAII object 
situations.  I don't know enough about the C++ rules to begin to author a QC 
feature request for this problem but I have a feeling my best course of 
action is to either live with the warning or disable it around the affected 
code.

Clayton
Technical Details
Message-ID: <478bba5f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <478a96e3@newsgroups.borland.com> <478b0076$1@newsgroups.borland.com> <478bac9a$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: "Clayton Arends" <nospam_claytonarends@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <478a96e3@newsgroups.borland.com> <478b0076$1@newsgroups.borland.com> <478bac9a$1@newsgroups.borland.com>
In-Reply-To: <478bac9a$1@newsgroups.borland.com>
Subject: Re: ensuring CriticalSections are release..
Date: Mon, 14 Jan 2008 11:38:55 -0800
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain;
 format=flowed;
 charset="Windows-1252";
 reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545
NNTP-Posting-Host: 68.113.27.46
Message-ID: <478bba5f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1200339551 68.113.27.46 (14 Jan 2008 11:39:11 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail