2 May 2012 01:05
Re: Re: About "Pointers vs. Values" in #Effective Go#
<at> Luke Keep in mind that you dont need a *[]DataRow, a simple []DataRow will suffice since slices are reference types. They just have some pointers inside them, and it will save you some headaches with de-reference symantics. If you are going to mutate []DataRow's structure (via append etc.) in another function you will need to pass it in as a pointer because the slice internal pointers might be replaced and the data moved or something.
RSS Feed