NOTE
Buffer
Buffer usage commonly follows writing, flip, reading, and clear or compact. These notes use its internal properties to explain state changes.
This is a historical learning note and may contain outdated or incomplete understanding.
Basic Usage
Write data into the Buffer.
Call flip().
Read data from the Buffer.
Call clear() or compact().
How It Works
There are three fields:
- capacity
- position
- limit
The meanings of position and limit depend on whether the Buffer is in read mode or write mode. The meaning of capacity is always the same regardless of the Buffer’s mode.
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub