Article View: borland.public.cppbuilder.nativeapi
Article #1785more info from OP
From: static array?
Date: Tue, 19 Jun 2007 15:38
Date: Tue, 19 Jun 2007 15:38
36 lines
2145 bytes
2145 bytes
OK - so I found that just by wrapping my auto_ptr in an internal block
inside the function, that the AV also goes away.
** This leads me to believe there is some sort of issue with unwinding the
stack and destruction of the auto_ptr.
The problem function more closely looks like this:
//-- this version works fine
long __fastcall TObj::Func(AnsiString a,
AnsiString b,
AnsiString c,
int d,
long e /*= 0*/)
{
try{
std::auto_ptr<TLicenseMutexHandler>pLMH(new TLicenseMutexHandler(a));
// do stuff to protected resource
}__finally { }
return 0;
}
//-- this version crashes in the kernel - AV!
long __fastcall TObj::Func(AnsiString a,
AnsiString b,
AnsiString c,
int d,
long e /*= 0*/)
{
std::auto_ptr<TLicenseMutexHandler>pLMH(new
TLicenseMutexHandler(MainLFName));
// do stuff to protected resource
return 0;
}
Technical Details
Message-ID:
<4677f899$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4677f486@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,1abf1872e1bc6ca3 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "static array?" <nospam@nospam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4677f486@newsgroups.borland.com> Subject: more info from OP Date: Tue, 19 Jun 2007 08:38:11 -0700 Lines: 39 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 NNTP-Posting-Host: 207.61.87.125 Message-ID: <4677f899$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1182267545 207.61.87.125 (19 Jun 2007 08:39:05 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail