2014年11月16日

Go-new和make

摘要: new返回指向struct的指针,new仅分配内存,而不对对象的值进行初始化make返回到strcut的对象,而不是指针,只能创建map,slice,channel对象make([]string, 5, 10)new([]string)http://www.sharejs.com/codes/go/... 阅读全文

posted @ 2014-11-16 14:34 awildfish 阅读(183) 评论(0) 推荐(0) 编辑

导航