Well passing by reference is underwater just like passing by pointer. The difference in C++ is that when passing something by reference you are guaranteed that that pointer points to valid memory. This is done by requiring that a reference is created from an actual C++ object variable and not a pointer variable.
This paradigm is something that is hard to make operable between multiple languages. You are probably better of just passing a pointer (which you can get in GM) and then doing checks on it to make sure it is valid.