I just used:

CStringArray sa;

sa.SetSize(0, 50000); // Grow in blocks of 50,000

Sleep(5000); // Wait so I can see the memory usage in Task Manager

for(int i=0;i<1000000;i++)
sa.Add("asdf");

Sleep(5000); // Wait so I can see the memory usage in Task Manager

sa.RemoveAll();

Sleep(5000); // Wait so I can see the memory usage in Task Manager




At the end, the memory usage in Debug build is down to around 1MB (all memory has been released), but in Release build the memory usage only goes down about 4MB, so it stays at 75MB....

Any ideas?

Stan