mirror of
https://github.com/fumiama/orbyte.git
synced 2026-06-15 16:00:24 +08:00
doc: edit README
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
b := pbuf.NewBytes(1024) // Allocate Bytes from pool.
|
b := pbuf.NewBytes(1024) // Allocate Bytes from pool.
|
||||||
rand.Read(b.Bytes()) // Do sth.
|
rand.Read(b.Bytes()) // Do sth.
|
||||||
b.Destroy() // Optional, can be auto-destroyed on GC.
|
b.KeepAlive() // Mark as reachable.
|
||||||
|
// After that, b will be auto-reused on GC.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user