Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for doesMakeSlice (0.14 sec)

  1. test/escape_array.go

    	a := new(a10) // ERROR "new\(a10\) does not escape"
    	a.s = x
    	b := new(a65537) // ERROR "new\(a65537\) escapes to heap"
    	b.s = y
    }
    
    // BAD: x need not leak.
    func doesMakeSlice(x *string, y *string) { // ERROR "leaking param: x" "leaking param: y"
    	a := make([]*string, 10) // ERROR "make\(\[\]\*string, 10\) does not escape"
    	a[0] = x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 23:50:32 UTC 2021
    - 3.6K bytes
    - Viewed (0)
Back to top