> You can write int[] vektor = new int[5];
> This array will be stored on the heap and you will have a
[quoted text clipped - 18 lines]
>
> I mean a reference is only a hidden pointer.
The problem is that the memory allocated to a reference type can move
around when the Garbage Collector runs. The GC will adjust references so
that they still "point" to their object after collecting memory. But if you
use a pointer and the memory moves, it would point to a "wrong" place.
That's why you write "fixed", in order to lock the memory to which the
pointer is pointing so that the GC doesn't relocate it.