Hard to tell with your limited explaination. There are some things you can do to see if it is really exhausting memory.
You can check the memory pointer to which memory allocated is assigned using malloc or new. use the condition the memory pointer is NULL for malloc or in the case of new, you can use
this technique. Most probably you are trying to access a invalid location. Try to use your debugger ( you know how to use it don't you ) and see at what part of your program does this occur.
Another way to determine if memory is really exhausted it by looking at the task manager if you are using windows. if you can see that the memory usage increases upto its maximum limit and fails while you execute the program, that means the memory is exhausted. If not, then you are doing something else wrong.
Reputation Points: 572
Solved Threads: 115
Mentally Challenged Mod.
Offline 1,559 posts
since Jun 2005