Fixed intrusive_ptr and named condition test and added documentation.

[SVN r40454]
This commit is contained in:
Ion Gaztañaga
2007-10-25 06:34:41 +00:00
parent 149a338b10
commit 423cc00342
6 changed files with 93 additions and 89 deletions

View File

@@ -40,10 +40,10 @@ int main()
//Initialize our data
for( multiallocation_iterator it = beg_it, end_it; it != end_it; ){
allocated_buffers.push_back(*it);
allocated_buffers.push_back(&*it);
//The iterator must be incremented before overwriting memory
//because otherwise, the iterator is invalidated.
std::memset(*it++, 0, 100);
std::memset(&*it++, 0, 100);
}
//Now deallocate
@@ -64,7 +64,7 @@ int main()
for(multiallocation_iterator it = beg_it; it;){
//The iterator must be incremented before overwriting memory
//because otherwise, the iterator is invalidated.
managed_shm.deallocate(*it++);
managed_shm.deallocate(&*it++);
}
}
catch(...){