I have a problem where my memory usage does not decrease when I clear a list. Here is a simple example:

Code:
int main()
{
    list<int> il;
    int k;

    for ( k=0; k != 50000000; k++)
          til.push_back(k)

    til.clear();

    cin >> k

    return 1;
}
The cin >> k statment is just to keep the program from ending so that I can see the memory usage at that point. I can see the memory usage increasing during the for loop, but it does not decresae at the til.clear() statement. The program is using the same amount of memory when it gets to cin >> k whether I clear til or not.

I have also tried putting a til.resize(0) after til.clear(). Am I missing something or is my compiler broken?

Thanks,
Loomis