diff --git a/doc/source/development/copy_on_write.rst b/doc/source/development/copy_on_write.rst index 34625ed645615..757a871b495c5 100644 --- a/doc/source/development/copy_on_write.rst +++ b/doc/source/development/copy_on_write.rst @@ -14,15 +14,15 @@ behaves as a copy. Reference tracking ------------------ -To be able to determine, if we have to make a copy when writing into a DataFrame, -we have to be aware, if the values are shared with another DataFrame. pandas +To be able to determine if we have to make a copy when writing into a DataFrame, +we have to be aware if the values are shared with another DataFrame. pandas keeps track of all ``Blocks`` that share values with another block internally to be able to tell when a copy needs to be triggered. The reference tracking mechanism is implemented on the Block level. We use a custom reference tracker object, ``BlockValuesRefs``, that keeps track of every block, whose values share memory with each other. The reference -is held through a weak-reference. Every two blocks that share some memory should +is held through a weak-reference. Every pair of blocks that share some memory should point to the same ``BlockValuesRefs`` object. If one block goes out of scope, the reference to this block dies. As a consequence, the reference tracker object always knows how many blocks are alive and share memory.