Hi all,
This is my problem:
void StartRun( void )
{
std::auto_ptr<Validate> val ( new Validate( "input.txt" ) );
val->DoIt( );
}
// Destructor
Validate::~WValidate( )
{
if( mFileIn.is_open())
{
mFileIn.close();
}
if( mFileOut.is_open() )
{
mFileOut.flush();
mFileOut.close();
}
}
The function DoIt() makes use of a DLL. Now heres the problem:
When there is an exception thrown by the DLL, I should say the
mFileOut should always be closed but it doesn't. I can't delete
the outputfile until I close my application because it says the
file is still open.
It only closes in the 'Debug Build' but not in the 'Release Build'.
Anyone has an idea ??
I use the Borland Developer Studio 2006.