Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestUserArenaCloneString (0.32 sec)

  1. src/runtime/arena_test.go

    	}
    	if !finalized.Load() {
    		t.Fatal("heap allocation kept alive through non-pointer reference")
    	}
    
    	// Clean up the arena.
    	a.Free()
    	GC()
    	GC()
    }
    
    func TestUserArenaCloneString(t *testing.T) {
    	a := NewUserArena()
    
    	// A static string (not on heap or arena)
    	var s = "abcdefghij"
    
    	// Create a byte slice in the arena, initialize it with s
    	var b []byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top