vendredi 10 mars 2017

How to use shared_ptr to manage already ref-count managed objects?

if an object is already reference-counted (like glib in C), having obj_ref, obj_unref. All we have is a pointer like obj *p.

How can we use c++'s shared_ptr to manage the object so that we can have an uniform interface.

Aucun commentaire:

Enregistrer un commentaire