Hello everyone,

I am learning from "Garbage Collector Basics and Performance Hints",


Two questions,

1. In the pattern "Too Many Pointers", what means "they merely "slide" together to remove the wasted space"?

2. In the pattern "Too Many Object Writes", I do not quite understand the emunerator and collector pattern, could anyone provide some brief pseudo code please?

If you are, for instance, doing simple operations in some kind of enumerator class, you might find that you need to move some of your key pointers from the main collection into the enumerator at every step. This is actually something you might want to avoid, because you effectively double the cost of copying those pointers around due to the write barrier and you might have to do it one or more times per loop on the enumerator.

thanks in advance,