Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for foonoleak (0.2 sec)

  1. test/escape2.go

    		return x
    	}()
    }
    
    var x *int
    
    func fooleak(xx *int) int { // ERROR "leaking param: xx$"
    	x = xx
    	return *x
    }
    
    func foonoleak(xx *int) int { // ERROR "xx does not escape$"
    	return *x + *xx
    }
    
    func foo31(x int) int { // ERROR "moved to heap: x$"
    	return fooleak(&x)
    }
    
    func foo32(x int) int {
    	return foonoleak(&x)
    }
    
    type Foo struct {
    	xx *int
    	x  int
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  2. test/escape2n.go

    		return x
    	}()
    }
    
    var x *int
    
    func fooleak(xx *int) int { // ERROR "leaking param: xx$"
    	x = xx
    	return *x
    }
    
    func foonoleak(xx *int) int { // ERROR "xx does not escape$"
    	return *x + *xx
    }
    
    func foo31(x int) int { // ERROR "moved to heap: x$"
    	return fooleak(&x)
    }
    
    func foo32(x int) int {
    	return foonoleak(&x)
    }
    
    type Foo struct {
    	xx *int
    	x  int
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
Back to top