зеркало из https://github.com/mozilla/gecko-dev.git
can't use operator new to allocate containers that use GC_allocator, because the Mac heap zone isn't scanned.
This commit is contained in:
Родитель
666b7fec85
Коммит
8875ed1f5c
|
@ -84,8 +84,7 @@ void main(int /* argc */, char* /* argv[] */)
|
|||
cout << "testing the GC allocator." << endl;
|
||||
|
||||
typedef gc_types<char>::string char_string;
|
||||
auto_ptr<char_string> ptr(new char_string("This is a garbage collectable string."));
|
||||
char_string& str = *ptr;
|
||||
char_string str("This is a garbage collectable string.");
|
||||
cout << str << endl;
|
||||
|
||||
// question, how can we partially evaluate a template?
|
||||
|
@ -106,7 +105,7 @@ void main(int /* argc */, char* /* argv[] */)
|
|||
}
|
||||
|
||||
// run a collection.
|
||||
GC_gcollect();
|
||||
gc_allocator<void>::collect();
|
||||
|
||||
// sort the values.
|
||||
sort(values.begin(), values.end());
|
||||
|
|
|
@ -84,8 +84,7 @@ void main(int /* argc */, char* /* argv[] */)
|
|||
cout << "testing the GC allocator." << endl;
|
||||
|
||||
typedef gc_types<char>::string char_string;
|
||||
auto_ptr<char_string> ptr(new char_string("This is a garbage collectable string."));
|
||||
char_string& str = *ptr;
|
||||
char_string str("This is a garbage collectable string.");
|
||||
cout << str << endl;
|
||||
|
||||
// question, how can we partially evaluate a template?
|
||||
|
@ -106,7 +105,7 @@ void main(int /* argc */, char* /* argv[] */)
|
|||
}
|
||||
|
||||
// run a collection.
|
||||
GC_gcollect();
|
||||
gc_allocator<void>::collect();
|
||||
|
||||
// sort the values.
|
||||
sort(values.begin(), values.end());
|
||||
|
|
Загрузка…
Ссылка в новой задаче