[prog] new and delete operator...

Kathryn Hogg kjh at flyballdogs.com
Thu Jul 12 13:27:43 UTC 2007


sena emre wrote:
> well, the program shuts down before completing some tasks due to
> unsufficient memory...
>
>   the value of my.sco is between 10-50, it varies...but I did not check
> the value of the
>   "new " operator... I have not check a value like this before....

What else is going on in the program?   I'd recommend printing out some
metrics:

cout << "my.sco = " << my.sco << ", sizeof(sol) = " << sizeof(sol) << endl;

When is it dying?  You shouldn't run out of memory during destructor calls
so I don't see how the "delete []" would help with that.


-- 
Kathryn
http://womensfooty.com


More information about the Programming mailing list