version 1.1.1.1, 1999/11/27 10:58:33 |
version 1.1.1.2, 2000/12/01 14:48:28 |
|
|
#ifdef MSWIN32 |
#ifdef MSWIN32 |
# include <windows.h> |
# include <windows.h> |
#endif |
#endif |
|
#ifdef GC_NAME_CONFLICT |
|
# define USE_GC UseGC |
|
struct foo * GC; |
|
#else |
|
# define USE_GC GC |
|
#endif |
|
|
|
|
#define my_assert( e ) \ |
#define my_assert( e ) \ |
Line 214 int APIENTRY WinMain( |
|
Line 220 int APIENTRY WinMain( |
|
for (i = 0; i < 1000; i++) { |
for (i = 0; i < 1000; i++) { |
C* c = new C( 2 ); |
C* c = new C( 2 ); |
C c1( 2 ); /* stack allocation should work too */ |
C c1( 2 ); /* stack allocation should work too */ |
D* d = ::new (GC, D::CleanUp, (void*) i) D( i ); |
D* d = ::new (USE_GC, D::CleanUp, (void*) i) D( i ); |
F* f = new F; |
F* f = new F; |
if (0 == i % 10) delete c;} |
if (0 == i % 10) delete c;} |
|
|
Line 222 int APIENTRY WinMain( |
|
Line 228 int APIENTRY WinMain( |
|
drop the references to them immediately, forcing many |
drop the references to them immediately, forcing many |
collections. */ |
collections. */ |
for (i = 0; i < 1000000; i++) { |
for (i = 0; i < 1000000; i++) { |
A* a = new (GC) A( i ); |
A* a = new (USE_GC) A( i ); |
B* b = new B( i ); |
B* b = new B( i ); |
b = new (GC) B( i ); |
b = new (USE_GC) B( i ); |
if (0 == i % 10) { |
if (0 == i % 10) { |
B::Deleting( 1 ); |
B::Deleting( 1 ); |
delete b; |
delete b; |