It freezes
Hi,
I have made an opengl viewer with animations...
When it runs more than 15minutes, it freezes the PC !!!!
I cant ping the crashed computer, nothing to do, just reset.
It does the same with linux and NT !
There is no blueScreen with windows, no error popup, nothing, just frozen !
It can''t be a memory overlap, or anything else, because if it was memory pb, the os display an error messsage. It can''t be a hardware pb, i try it with many computers.
So what is the pb ?
thanks
January 31, 2003 07:39 AM
Can you run other opengl application over 15 minutes ??
if not it maybe something about your hardware...
if not it maybe something about your hardware...
Actualy it can be a memory problem.
One possible case is that you load up so much stuff that you use up all of your memory
Second Case is that your program has a memory leak . Which means you delete the pointer but u dont delete what it points too.
Operationg system can''t detect a memory leak !!!!!!
So there would be any errors
One possible case is that you load up so much stuff that you use up all of your memory
Second Case is that your program has a memory leak . Which means you delete the pointer but u dont delete what it points too.
Operationg system can''t detect a memory leak !!!!!!
So there would be any errors
char *lump;
void alloc()
{
lump = new char [300];
fread(lump, 1, 300, filePointer);
}
void dealloc()
{
delete lump;
// free (lump);
}
main()
{
alloc();
dealloc();
}
in the dealloc func, should i use delete or free ?
void alloc()
{
lump = new char [300];
fread(lump, 1, 300, filePointer);
}
void dealloc()
{
delete lump;
// free (lump);
}
main()
{
alloc();
dealloc();
}
in the dealloc func, should i use delete or free ?
I think that if you are deleting an array you use
delete[], and not just delete...
delete[], and not just delete...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement