What is the real difference between Pointers and References?

后端 未结 22 2890
南方客
南方客 2020-12-01 04:33

AKA - What\'s this obsession with pointers?

Having only really used modern, object oriented languages like ActionScript, Java and C#, I don\'t really understand the

22条回答
  •  余生分开走
    2020-12-01 05:19

    Parameter efficency - passing a pointer (Int - 4 bytes) as opposed to copying a whole (arbitarily large) object.

    Java classes are passed via reference (basically a pointer) also btw, its just that in java that's hidden from the programmer.

提交回复
热议问题