Déréférencement

Vous pouvez déréférencer un pointeur intelligent avec l'opérateur -> pour appeler des fonctions membres de l'instance subjacente, comme pour un pointeur normal.

auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);
auto width = refPixbuf->get_width();

You can also use the * operator and the get() method to access the underlying instance, but it's usually a bad idea to do so. Unless you are careful, you can end up with a pointer or a reference which is not included in the reference count.

auto refPixbuf = Gdk::Pixbuf::create_from_file(filename);
auto& underlying = *refPixbuf; // Possible, but not recommended