I'm wondering if there is any difference between passing an object reference as a parameter or as an argument. Is the code below equivalent? Is there situations where I should use one or the other?
void foo(Object &object){
    object.update()
}
 Object object
 foo(object)
VS
void bar(Object *object){
     object->update()
}
Object object
bar(&object)
 
     
    