memory usage optimizations for read and write operations

Please see the comments about this function in ```CStoreWriteRow()```.