On Friday, January 27, 2017 at 3:38:12 AM UTC+8, Jakob Borg wrote: > > It depends. A call to new can (and will, often) give you a pointer to a > stack allocated object. If you pass that pointer to something like > fmt.Println() you'll see the object escape to the heap, get flagged by -m, > and presumably forbidden by -+. >
so new(T) is just a sugar of the following one? var t T; &t > > //jb > > > On 26 Jan 2017, at 20:10, T L <tapi...@gmail.com <javascript:>> wrote: > > > > It looks a call to new will not be reported by -m either. > > > > I still don't understand what are implicit memory allocations, could you > make an explanation? > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.