• Advertisement

Archived

This topic is now archived and is closed to further replies.

It freezes

This topic is 5500 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Can you run other opengl application over 15 minutes ??
if not it maybe something about your hardware...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
WEIRD

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
quote:
yes but here, i use both new and malloc (fread)


No, you are only using new. fread is NOT malloc, why would you think that it is?

You must use delete [] in this case.

Share this post


Link to post
Share on other sites

  • Advertisement