ultimatepp/benchmarks/NewDelete/NewDelete.cpp
cxl a1aff03eaa .benchmarks
git-svn-id: svn://ultimatepp.org/upp/trunk@4748 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2012-04-05 16:42:37 +00:00

20 lines
283 B
C++

#include <Core/Core.h>
using namespace Upp;
class Test {
public:
Test (int c) {count = c;}
// virtual ~Test() { }
int count;
};
CONSOLE_APP_MAIN
{
RTIMING("NewDelete");
for (int i=0; i<=100000000; i++) {
Test *test = new Test(i);
delete test;
}
}