 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
dkat Guest
|
Posted: Thu Dec 11, 2008 10:14 pm Post subject: How do I destroy this vector? |
|
|
I have never had a problem with a progam taking care of destroying
global allocated memory stores before but now that I have added a
keyboard handler I am and I can only assume it is this one variable.
How do I destroy it myself? (I am deleting the keyboard variable
without any indication of it being the problem). Thank you for your
time. D Kat
class Trial
{
public:
AnsiString WaveFile; // audio stimulus wave filename
AnsiString ButtonResponse; // Subject's response if needed
AnsiString RT; // Stimulus time or response time from beginning of
stimulus display
};
vector<Trial> TrialList;
//for loop of i
TrialList.push_back(TempTrial); // add a trial element
TrialList[i].WaveFile=TempString.SubString(1,p=TempString.Pos
(",")-1); // get audio filename
TrialList[i].ButtonResponse = "0 ";
TrialList[i].RT = "0 ";
//---------------------------------------------------------------------------
void TMainForm::HWClose(void)
{
if(!HWInitFlag)return;
DXKeyboardInput->FlushKeyboardData();
// DXKeyboardInput->SetActiveDevices(true,true,true); //keyboard
responses(mouse,key,joy)
DXKeyboardInput->SetKeyboardExclusive(false);
delete DXSound;//SAFEDELETE(DXSound);
delete DXKeyboardInput;//SAFEDELETE(DXKeyboardInput);
ShowCursor(true);
HWInitFlag = false;
return;
} |
|
| Back to top |
|
 |
dkat Guest
|
Posted: Thu Dec 11, 2008 11:21 pm Post subject: Re: How do I destroy this vector? |
|
|
On Dec 11, 5:14 pm, dkat <dkats...@gmail.com> wrote:
Got
TrailList.clear();
to compile just fine but that does not seem to be the problem. The
application gets all the way through to the ~mainform() destruct and
then hangs at
vector.h
~vector ()
{
__destroy(__start, __finish);
__value_alloc_type(__end_of_storage).deallocate
(__start,__end_of_storage.data()-__start);
}
with this error
'Access fiolation at address 0040976A. Read of address FEEEFEF6.
Process stopped. Use Step or Run to Continue. |
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group .
|