mirror of
https://github.com/fumiama/orbyte.git
synced 2026-06-11 21:51:18 +08:00
optimize: change Destroy -> ManualDestroy
This commit is contained in:
@@ -42,7 +42,7 @@ func testBuffer(buf *orbyte.Item[bytes.Buffer], t *testing.T) {
|
||||
if !bytes.Equal(bufr.Pointer().Bytes(), buf.Pointer().Bytes()) {
|
||||
t.Fatal("unexpected")
|
||||
}
|
||||
bufr.Destroy()
|
||||
bufr.ManualDestroy()
|
||||
|
||||
bufcp = bufcp.Trans()
|
||||
if bufcp.Pointer().Len() != 4096 {
|
||||
@@ -51,7 +51,7 @@ func testBuffer(buf *orbyte.Item[bytes.Buffer], t *testing.T) {
|
||||
if !bytes.Equal(bufcp.Pointer().Bytes(), buf.Pointer().Bytes()) {
|
||||
t.Fatal("unexpected")
|
||||
}
|
||||
bufcp.Destroy()
|
||||
bufcp.ManualDestroy()
|
||||
|
||||
runtime.GC()
|
||||
runtime.Gosched()
|
||||
|
||||
Reference in New Issue
Block a user