Discover Packages
gitea.narnian.us/lordwelch/goimagehash
pool
package
Version:
v0.0.0-...-e91c39c
Opens a new window with list of versions in this module.
Published: Jan 30, 2025
License: BSD-2-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Get returns an empty byte buffer from the pool.
Got byte buffer may be returned to the pool via Put call.
This reduces the number of memory allocations required for byte buffer
management.
Put returns byte buffer to the pool.
[]uint8.B mustn't be touched after returning it to the pool.
Otherwise data races will occur.
Pool represents byte buffer pool.
Distinct pools may be used for distinct types of byte buffers.
Properly determined byte buffer types with their own pools may help reducing
memory waste.
Get returns new byte buffer with zero length.
The byte buffer may be returned to the pool via Put after the use
in order to minimize GC overhead.
Put releases byte buffer obtained via Get to the pool.
The buffer mustn't be accessed after returning to the pool.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.