What is the real difference between Pointers and References?

后端 未结 22 2894
南方客
南方客 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:11

    Also just something to note, you can use pointers in C# (as opposed to normal references) by marking a block of code as unsafe. Then you can run around changing memory addresses directly and do pointer arithmetic and all that fun stuff. It's great for very fast image manipulation (the only place I personally have used it).

    As far as I know Java and ActionScript don't support unsafe code and pointers.

提交回复
热议问题